configuration composer.json Symfony3 and sonataAdmin - fosuserbundle

I want to start a project with Symfony3 and SonataAdmin
I was trying a lot of versions of symfony and sonataAdminBundle
But I always get errors when updating composer
What's the correct composer.json to start my project
thanks

According to packagist the current v3.3.1 of SonataAdminBundle should be compatible with Symfony ^3.0.
You can just run composer require sonata-project/admin-bundle and it will automatically look for the newest compatible version. If that fails you could try allowing development-versions as well.
composer require sonata-project/admin-bundle:dev-master
That should be your last resort though as it pulls in an unstable dependency. Feel free to add composer's error to your question and maybe I or someone else can give a more precise answer.

Related

Require Composer v2.0?

Is there a way to require someone to have composer v2.0 installed, so that otherwise a project can't be build, when running "composer install"? I just find version requirements related to specific composer packages, but no way to require a certain version for composer itself, but maybe someone knows more about it?
You can use composer require composer-runtime-api:^2

App rejected by Apple due to UIWebView being deprecated

I was working on a minor update to an app already accepted and available in the Apple App Store, and when I uploaded the new version, I got an e-mail that the binary was rejected because:
ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no
longer accepted. Instead, use WKWebView for improved security and
reliability. Learn more
(https://developer.apple.com/documentation/uikit/uiwebview).
How do I go about doing that? Is there a build hint or something?
Additional Information:
My app is using some CN1 extensions:
SENSORS,
BLUETOOTHLE,
JSON (required for BLUETOOTHLE)
As the BLUETOOTHLE extension uses a Cordova plugin, and Cordova was using UIWebView, I think that is the likely source.
According to Cordova's issue tracker, the Cordova plugin doesn't use UIWebView in its latest. It is possible that the build server has an old version cached. Try explicitly setting the version to 6.1 by adding the following build hint:
ios.pods=Cordova ~> 6.1
You'll already have this build hint, you just need to add the "~> 6.1" part.
Please post to indicate whether this fixed your issue, and I'll update the cn1lib to automatically add the version to the build hint.
Codename One doesn't use UIWebView at all. Make sure all your cn1libs are up to date and list them. Review your own native code and dependencies if you have any to make sure there's no usage there.

AngularJS throws Error: [ng:cpws] Can't copy! Making copies

I installed a project from work on my personal computer and only on my machine I get this runtime error. I personally think it has to do with the way the code is compiled.
My question is why the error appears on my machine only?
Error: [ng:cpws] Can't copy! Making copies of Window or Scope instances is not supported.
https://errors.angularjs.org/1.6.7/ng/cpws
First thing I checked to see if the node and npm versions are the same and they are:
node: v8.11.3
npm: 5.6.0
OS: Windows 10
The piece of code that generates this error is using $scope.$watch(object, callback, true). After looking on the angular documentation I deleted the third parameter which seemed to be the trouble maker. After that, I encountered other problems so I asked myself why on my machine (which from an environment perspective is the same) the error appears and I stopped modifying the code and start looking on the building part.
I don't know if this will help you but the page that generates the error contains a form build using angular-formly.
Also, we are using laravel mix to compile the code.
UPDATE
I just updated the node and npm version. At first, I had some issues with the node-sass package but I solved it.
I still have the errors. :(
node: v11.10.0
npm: 6.8.0
Try to recheck if the correct version of angularjs is loaded for you. Many boilerplates declare the angular dependency using something like:
...
"angular": "^1.6.7",
...
When npm sees this it will load the latest MINOR version if the library is not in node_modules directory. If it is in the node_modules directory and it is greater or equal to 1.6 it will leave it as is. Having a package-lock file might save you from this issue if you actually commit it in the version control system that you use.
This is problematic because loading the 1.7 version might bring in backward incompatible changes (angularjs does not respect semver).

ugprade cakephp 3 to latest version

i have cakephp3.3 windows and i need to upgrade to cakephp3.6. Checking the docs i see there is no tool available. Checking the migration guides i am not seeing any issues with my code in cake3.3 with newer versions.
Do i simply create a new instance of cake3.6 and create models,controllers again using bake and then copy over code to see if this works? what is an efficient way
The docs in cakephp are not clear on this process. do i upgrade to 3.4 then 3.5,3.6?
https://book.cakephp.org/3.0/en/appendices/3-x-migration-guide.html
Use composer.
For Windows, you can download it from here. After installation, locate composer.json file in your CakePHP application directory, and look for "require" part, and update line regarding CakePHP as follows:
"require": {
"php": ">=5.6",
"cakephp/cakephp": "3.6.*",
....
}
Then, in command line, navigate to your CakePHP installation directory and fire composer update. After a while you should have your CakePHP upgraded.
More info about updating to new version can be found in docs:
Keeping up to date with latest CakePHP changes
Another solution was given which was to install a new instance of cakephp and just copy over scr folder and other relevant code in the new instance. This is more work but the conversion from 3.3 to 3.6 isnt very clean with a composer update

Eclipse Juno 4.2 Google Plugin not installing: Cannot complete install because one or more required items could not be found

This is the error message I get:
Cannot complete the install because one or more required items could not be found.
Software being installed: Google App Engine Tools for Android 3.1.0.v201208080121-rel-r42 (com.google.gdt.eclipse.mobile.android.feature.feature.group 3.1.0.v201208080121-rel-r42)
I've tried numerous things including manually downloading the file from here and also I snooped around StackOverflow and I tried just moving all the plugins from the manual download into the plugins folder of my Eclipse. That didn't help me though because my perspective did not update with the plugins and I couldn't find the "Create New Web Application" option. I've also read some things about the XML file being wrong but I can't find it and those were for other Eclipse versions so I don't know if it applies to me.
I also tried excluding Google App Engine Tools for Android 3.1.0 but then it just says the next one in the list can't be found.
I'll be more than happy to provide anymore information. I am running Eclipse Juno 4.2 and Java 1.7 (I also have 1.6 installed though). I am using a Windows 7 PC. Thank you guys so much! I just want to code :[
I did not work for me with this URL: http://dl.google.com/eclipse/plugin/4.2
It worked with this one: http://dl.google.com/eclipse/plugin/3.8
I just changed 4.2 to 3.8.
I faced a similar problem I was downloading with 120 kb/s every time the download breaks down
when I moved to another place and downloaded the plugin with highest speed 400 kb/s It successfully downloaded and no problems found
You might think that issue is out of logic but that what I reached so far
Hope that Helps
I know this is a very old question but recently I found a solution to my problem so I am going to personally update the answer. For some reason, Eclipse Classic 4.2.2 Juno does not come with some of the required packages. After talking to some people, they recommended simply downloading Eclipse IDE for Java EE Developers which simply comes with most of the packages necessary. From there, it just worked!
My friend also mentioned you could try to manually download the packages on Eclipse Classic but that is far more of a hassle.
Hope this helps!

Resources