Symfony 5 and Sonata Admin Bundle Compatability? - composer-php

A quick question about using the Sonata Admin Bundle with Symfony 5.
Has anyone been able to run a simple Composer require on the project and do the actual installation without minimum stability errors?
Cheers

Related

Installing Sonata Admin with Symfony 2.8 and PHP 7.2

I have an existing (and working) Symfony 2.8 project with Sonata Admin. It used to be installed on a server with PHP 5.6, but I have to move it to a server running PHP 7.2.
For some reason my composer.json was not in sync with its composer.lock so I'm trying to fix that but I'm lost in a dependency hell. Hoping someone here has a working setup similar to mine :)
I have a bunch of dependencies, but here are the ones that seem to be the culprits:
sonata-project/admin-bundle
sonata-project/block-bundle
sonata-project/core-bundle
sonata-project/datagrid-bundle
sonata-project/doctrine-orm-admin-bundle
sonata-project/intl-bundle
sonata-project/user-bundle
I used to have them in 2.2.*#dev, 2.3.*#dev or 2.4.*#dev but I now get conflicts when I require them this way. I eventually got a valid composer.lock with this config (notice I removed block-bundle because it is required by one of these):
"sonata-project/admin-bundle" : "2.3.10",
"sonata-project/datagrid-bundle" : "^2.2.1",
"sonata-project/doctrine-orm-admin-bundle": "^2.2.8",
"sonata-project/intl-bundle" : "^2.2.4",
"sonata-project/user-bundle" : "^2.2.5",
But the admin part of the site is broken with the following error:
Variable "sonata_admin" does not exist
I also got Block "preview" on template "SonataAdminBundle::standard_layout.html.twig" does not exist at some point, but can't remember when/how.
I know Sonata has a long history of making Composer dependency a complicated thing (because of its multiple packages and versions), and I've read numerous questions/issues on Stack Overflow and GitHub but couldn't find the one for me.
Has anyone found the perfect combination of requirements?
Would love to know!

Problem with migration Joomla 1.5.26 to 3.x with jUpgradePro

I need to migrate an old website witch is using Joomla 1.5 to Joomla 3.x.
I updated Joomla to 1.5.26 and I decided to buy and use tool jUpgradePro from https://matware.com.ar/subscriptions/jupgradepro-subscription.html .
I configured everything and I'm trying to start migration but there's one problem and I need Your help.
When I start using cmd of jupgradepro there's one error message after using command composer install.
Cannot update only a partial set of packages without a lock file present
What can I do with this problem, any Issue? I was trying to search something in web, but finally have to ask You for help.
One thing that I can say is that this example is a test so target domain is a subdomain (http://ernestdolowy.pl/projects/szpital/nowytest/) and source site has just empty test template, is that a problem? Joomla 3.x is well configured on subdomain.
Finally I need to migrate Joomla 3.x to Wordpress but right now I have to solve this problem.
Thank you in advance for your help :)
I got same problem, and found this solution on my local machine:
In Joomla site, xxx\administrator\components\com_jupgradepro I copied the composer.json file to composer.lock
I started composer install command from command line (in Windows, not in built-in jUpgradePro). It installed all dependencies, and in jUpgradePro command line window the check site command worked fine.
Solution:

How to update CodeIgniter with Composer?

I switched from Symfony to CodeIgniter and I would like it to stay up-to-date with the framework.
I understand that you can easely install and update all kind of packages, I know how to do it as I did it over and over again with Symfony.
I already set $config['composer_autoload'] = TRUE; in application/config/config.php. (Thanks to a lot of other SO questions)
My problem: Composer seems to update all the packages fine, but not the framework itself. Is it possible or am I doomed to do it manually?
EDIT
Please consider using CodeIgniter 4, which is made to be used with Composer from the start. CodeIgniter 3 is old and should only be used on legacy projects.
You can update your codeigniter using composer by below method:
$ cd /path/to/codeigniter
$ composer update
Here you can get more info about this
CodeIgniter hasn't been made as a composer package… except that someone eventually did it anyway!
It is possible to keep CodeIgniter up-to-date by installing it throught composer in the first place. The project is hosted on GitHub.
In order to use it, it's quite easy: composer create-project kenjis/codeigniter-composer-installer codeigniter should do the trick!

Laravel Download and Installation

I'm a webdeveloper and I'm starting a huge project requested by a company.
I'm trying to figure out if is best to use a PHP framework or not, and in case, which one.
I know Codeigniter, but I wanted to look around to see what's the best framework at the moment. I found out Laravel is trending at the top so I wanted to try it out.
Being used to Codeigniter I usually download the zip file with all the phps inside and start working. I'm trying to do the same with Laravel but I saw you are to download and use composer to install it.
I'm not really used to the Terminal and I wanted to ask if that's the only way of installing it or if there is a downloadable version as in Codeigniter, CakePHP, etc...
You can always download the ZIPped code directly from project's GitHub site. You can find the base application here: https://github.com/laravel/laravel - you'll find a link at the bottom of the right column. This code is what composer downloads when you use that to setup the application.
If you want to use Laravel you will have to use Composer as this is what the application uses to manage its dependencies. It's not hard, as you'll only need to run a few commands.
You can learn more about how to install and use composer in the docs: https://getcomposer.org/download/

Installing yii2 framework using Xampp - do i need a github account?

A couple of years of go i used to program using PHP, but without frameworks. With these recent developments I've decided to get in the to the game and try using one. I've decided to use yii 2.0 .
I've read some of the documentation and in my opinion there is some lack of information (at least for who is getting started), so i´m having some problems installing yii 2.0 on my computer using Xampp. The PHP version is 5.5.9.
From what i could understand i downloaded the yii 2.0 framework, extracted the content and copied to c:\xampp\htdocs\yii2
I've already installed the composer, so the the next thing to do i think would be, using the cmd, do these two lines of code:
composer global require "fxp/composer-asset-plugin:1.0.0"
composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic
The problem is when i do the last one it asks for username and password i think of GitHub. Can you tell me if I'm obligated to have an account on github to install yii 2.0 framework.
Is there a way to get around this?
Yii2 is integrated with composer asset plugin. It allows download Bower and NodeJs packages through Composer.
Github account is required to overcome API rate limit. Here is the explanation from the main contributor of this extension:
It's a rate limit of Github API. In anonymous access, Github at a
greatly reduced limit (60/hr it seems to me), and we must be logged
with a token for have a much higher limit.
See composer/composer#1569 and composer/composer#1877
The problem also exists using Nodejs and Bower.
You can find it in this issue, it's 9th from the top.
I think workaround with installing Bower and the same packages is not an option, because initially and with each framework update you must manually synchronize packages with their versions and override some configuration. Also some extensions require javascript plugins and using composer asset plugin too. So you have to do the same with each of them too. It simply not worth it. And having account on Github for web developer nowadays is kind of de facto standard.
Just create Github account if you are still don't have one and everything should be fine. Earlier updating process was pretty slow, now it's faster and I found this approach pretty interesting and flexible.

Resources