Symfony downgrade from 3.2 to 2.8 lts - php

I have started with symfony 3.2 project, then changed version in composer to 2.8 (which is long term support).
Problem is that folders structure still remains 3.2 project. Is there any way to change (not manually) folders structure to 2.8?

Of course you can downgrade. You might choose the old Symfony2 directory structure (deprecated) or keeping the current Symfony3 structure.
In either ways, please take a look at How to Override Symfony's Directory Structure.
Using the Symfony3 directory structure
If you choose to use the Symfony3 structure, it's easy as following up this article about upgrading from Symfony2 to Symfony3's directory structure.
Using the Symfony2 directory structure
First you'll have to rename and move some files (like var/cache/, var/logs/, etc.). Afterwards you'll have to change the autoloading file in app/autoload.php (formerly var/autoload.php which you must move too).
Basically it's the same in reverse order like upgrading from Symfony2 to Symfony3 (mentioned above).
Please be aware that Symfony 3.4 (next LTS) will be released in November 2017, so in my opinion it's not worth to downgrade, and then re-upgrade. Upgrading from 3.2 to 3.4 will be small and fast, Upgrading from 2.8 to 3.4 could be much more to do ...

Related

ZF2 project does not updating via composer

I have been given a zend project to work on, when i do the usual composer.phar install/update the existing ZF2 folder is unchanged, a new zend framework folder is created instead.
I ask this question because I updated once after deleting libraries in ZF2 folder and they were reinstalled (in the ZF2 folder).
If this is the current default behavior then all good, but I have a nagging feeling that i might not be updating correctly, and therefore not confident of the project behavior.
Is installing directly into existing ZF2 folder now defunct?
ZF2 version < ~2.5 will download a folder vendor in which will put a new folder called zendframework/zendframework/library/Zend/all zend modules.
In version 2.5+ ZF2 is using a new way of distributing its modules via separated meta packages, which makes it even easier to maintain. Of course the structure is different /vendor/zendframework/all zend modules
If you have any 3rd parties packages for example: phpunit, fabpot, symfony, bjyoungblood etc, they will be stored in your vendor/packagename folder, regardless of your ZF2 version.
However, there are few exceptions for modules like zend developer tools and zendxml, which will be installed in your vendor/zendframework folder.

how do I upgrade symfony 1.3 to 2.x?

At work we use Symfony 1.3 and I want to upgrade to the latest version of symfony.
I saw this article:
symfony upgrade 1.4
That's a upgrade from 1.3 to 1.4 not verry helfull.
Can I download the latest symfony and create a new project and copy the folders from 1.3 like app, web, lib, config etc etc to my new version?
Ralph
There are quite a few differences between symfony1 and symfony2
You can read about the differences between the 2 on the How Symfony2 Differs from Symfony1 docs page

Symfony2 CMF TreeBundle has disappeared

Our custom CMS utilizes TreeBundle from Symfony2 CMF. When deploying to a production server, bin/vendors install failed because apparently the whole bundle does no longer exist - at least in GitHub. The Symfony2 CMF homepage still mentions the bundle, the link just leads to a 404 page.
Is the bundle gone for good? What happened to it? Is there a Symfony 2.0 compatible replacement for it or should we just include the bundle in our own repository?
This bundle was refactored into the TreeBrowserBundle and the old bundle removed after a while. See here for the discussion about that: https://groups.google.com/forum/?fromgroups=#!searchin/symfony-cmf-devs/treebundle/symfony-cmf-devs/k7nm-XtXW8Q/kgZpaOJN1x8J
If you can update your project, then just do that and drop the reference to TreeBundle. Otherwise the easiest would indeed be to include it in your own repository.
We assumed that the early adopters of the CMF frequently update, and thus we removed this repository after a few months. Sorry about that. We will be more careful with backwards compatibility the more stable we get.

Update project based on Symfony 2.0 to Symfony 2.2

I am trying to update my project written in Symfony 2.0 into Symfony 2.2.
Moving source codes into 2.2 project ended with config.yml and security.yml incompatibiliy.
Is there way how to properly migrate Symfony 2.0 project into Symfony 2.2?
It better to wait until Symfony 2.3 before migrating. It will be released somewhere in May. It's the first LTS (Long Time Support) release, meaning that it's maintained for three years. So: You don't have to worry about BC breaks for 3 years!
For the migrating of Symfony 2.0 to 2.3: There is nothing you can do. Read the UPGRADE-*.md files (which are stored in the root of the symfony/symfony package) and fix anything that is in their in your code. Every BC break that's important for normal users will be put in those UPGRADE files.
If you can't solve it after the fixing everything in the UPGRADE files, you should take a look at the CHANGELOG.md files in the root of the package (e.g. the symfony/security package). Try to find something that is changed and cause your code to break.
Finally, if you don't get your script working, there are a lot of active Symfony2 users who are waiting to help you. Take a look at the community page and find your place to ask questions.

How to run multiple versions of Symfony PHP Framework

I have several web projects built with Symfony v1.0, but I am excited by the new features in Symfony version 1.4 (Improved security, native email support and improved performance).
How can I continue to develop my 1.0 projects but also create a testing environment for version 1.4?
Guide to Installing Multiple versions of Symfony
Thankyou to Guillaume Flandre for pointing it out, there is a fantastic article written by eHabib on SymfonyNerds.com - http://symfonynerds.com/blog/?p=123
Here is the basic outline, read the whole article here.
Step 1 - Un-install Symfony via PEAR
Step 2 - Setup a structure for Symfony: Install symfony in /usr/share/php/symfony
Step 3 - Checkout each Symfony version you need
Use SVN checkout to grab each Symfony version. Put these in a different folder under the base Symfony directory.
Step 4 - Create symbolic links for each version
Create and test symlinks for each version of Symfony. Lets place these in the standard bin directory
Step 5 - Creating a new project
Use the relevant Symfony command. For example, to create a Symfony 1.0 project:
sudo symfony10 init-project test1
sudo symfony11 generate:project test11
sudo symfony12 generate:project test12
Step 6 - Check in the project Config to ensure its picked up the right version.
This link should be useful: http://symfonynerds.com/blog/?p=123
It points to an article named: Your complete guide to running multiple Symfony versions on the same environment
It's fairly easy to do.
As also said in the article, I define it in lib/vendor as svn:externals: symfony http://svn.symfony-project.com/branches/1.2
So there's no symfony to be installed on the server at all and you can use as many versions without influence on other apps.

Categories