Pimcore: Cannot use Pimcore\Model\Object after update to Pimcore 4 - pimcore

After updating Pimcore to version 5 I am getting:
Cannot use Pimcore\Model\Object as Object because 'Object' is a special class name in ...
somebody had the same problem please help.

This is caused by the fact that Object is a reserved word in PHP 7.2 

You should use
\Pimcore\Model\DataObject
instead of
\Pimcore\Model\Object

Related

Typescript template literal strings type error

A new version of Typescript is allowing to use template litteral strings as types like for example:
type Hey = 'Hey';
type HeyThere = `${Hey} There`;
And it's working very well in the playground of Typescript with the last version which is 4.1.3.
But when I try using it in my projects, I still get the "Type expected. ts(1110)" error in my syntax.
Even though of course I updated the package to the latest version, I also tried to use it in a new project created from scratch and still didn't work. I'm sure it's a very simple mistake but I can't fix it. Also this is very new feature so I can't find much answers online.
Thank you very much for your help!
update ts-loader to version 8 or 9

How can I get WebStorm to recognize the NodeJS module object?

When I am creating a NodeJS module to be exported, the module object is not recognized. Is there a way to get this module object ot be recognized. I looked under the Settings&Framworks > Node and that appears to be correct. Although I can't seem to keep the "Coding assistance for Node.js" checked (it keeps clearing the 'check')
I looked through IntelliJ's Reference Material Here
I actually may be coding incorrectly as well, perhaps I'm not supposed to hook into this 'exports' object in this manor.
Advice and guidance appreciated.
First this question is very similar to This Question
First I went to the settings (Ctrl-Alt-S) and
'Language & Frameworks' > JavaScript > Libraries
Then I hit the Download button till I found a bunch of node libraries. I figured this was a very 'basic' node object so I used the plain 'node' libary.
Then the #types/node was present for me to enable

Does not recognize Add Collection Mappers from automapper.collection

I try to use automapper.collection but in the Mapper.Initialize method the AddCollectionMappers method is not recognized
I'm using .net 4.7, automapper 6.1.1, automapper.collection 3.1.1
Thank you.
enter image description here
Try adding using statement:
using AutoMapper.EquivalencyExpression;

Creating a new project in Android studio-Kotlin error

I am very new to Kotlin and I am creating a new project that supports Kotlin in Android Studio 3.0 canary.
This project is having two issues.
The R file is not getting resolved
The package name must be a '.' separated identifier list
What should I do now?
Thanks in advance.
I assume you are using one of Kotlin keywords in your package name.
To fix compilation error just surround the Keywords like in ,as,is with Grave accent ( ` ). E.g.
`is`.package.name,
`in`.company.app
Hope, it'll help you.
This happens when you use a domain name with ".in" or any 2 character TLD in domain name while creating the project. This should be resolved if you create with a 3 character TLD domain name. Otherwise you can use as in_.xyz

What lib in the gecko 1.9.3 SDK do I link against to use moz_xmalloc()?

I'm trying to link my XPCOM extension against the 1.9.3a3pre SDK and I get the following:
error LNK2001: unresolved external symbol _moz_xmalloc
So, what lib do I need to link to? The documentation doesn't say.
This is on Windows right now, but I'll need it to build on Mac and Linux (32bit/64bit) as well.
Edit: Now with bounty.
Edit: Update: Turns out FF3.7 was cancelled. So I don't have to worry about this until FF4.
I have same error, and linking to mozalloc helps for that.
define 'XPCOM_GLUE' in C++ Preprocessor Definition property. It will fix the linking error.
Try defining MOZ_NO_MOZALLOC when compiling your extension, you will then get a DLL that uses your CRT's allocators. (Don't forget to use the NS_* allocators for XPCOM-compatible memory.)
Add MOZ_NO_MOZALLOC in C++->Preprocessor->Definition property.
Use xpcomglue_s_nomozalloc.lib instead of xpcomglue_s.lib in Linker->Input->Additional Dependencies
It will be OK!
reminder note: another option that can cause this even though everything else seems to be configured correctly in the project, is pointing at the wrong libs folder - such as 32 bit version for a 64 bit build.
edit v40 mozalloc.lib has changed name to mozglue.lib and has some additional methods.
edit v41 mozglue.lib has changed name to mozcrt.lib

Resources