Upgrade ullright symfony version
2015-09-14: fixed bug in plugins/sfImageTransformPlugin/lib/transforms/ImageMagick/sfImageRectangleImageMagick.class.php:L98 (should read "y")
2020-10-02: AssetHelper.php: removed test/javascript, added defer and defer blacklist
2021-05-13: Support https for CLI url creation. sfRouting::fixGeneratedUrl()
Original Symfony
Do it on the svn server! (See below "Commit problem")
- svn remove lib/vendor/symfony/
- svn commit -m "Removing old symfony version for upgrade"
- svn export http://svn.symfony-project.com/tags/RELEASE_1_4_X lib/vendor/symfony
- Replace lime2
- rm -r lib/vendor/symfony/lib/vendor/lime/
- svn export -r3479 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/vendor/lime/@3479 lib/vendor/symfony/lib/vendor/lime/
- Add mobile error templates
- svn export -r3460 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/exception/data/error.mobile.php@3460 lib/vendor/symfony/lib/exception/data/error.mobile.php
- svn export -r3460 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/exception/data/exception.mobile.php@3460 lib/vendor/symfony/lib/exception/data/exception.mobile.php
- rm -r lib/vendor/symfony/lib/plugins/sfPropelPlugin/*
- svn add lib/vendor/symfony/
- svn commit -m "Commiting new symfony version before patching"
- patching
- patch -p 0 < plugins/ullCorePlugin/patch/Sluggable.patch
- patch -p 0 < plugins/ullCorePlugin/patch/Doctrine_Connection_evictAll.patch
- patch -p 0 < plugins/ullCorePlugin/patch/Doctrine_UnitOfWork_buildFlushTree.patch
- patch -p 0 < plugins/ullCorePlugin/patch/pluginTestTasks.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfBrowser.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfView.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper2.patch
- patch -p 0 < plugins/ullCorePlugin/patch/TextHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfBaseTask.patch
- patch -p 0 < plugins/ullCorePlugin/patch/UrlHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/UrlHelper2.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfCommonFilter.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfCommonFilter2.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfControllerModuleDisabled.patch
- svn stat
- delete .orig files
- Change default http redirect code from 302 (temp) to 301 (permanent)
- action/sfAction.class.php
- svn commit -m "Applied symfony patches, Upgraded to latest symfony version"
Commit problem
A strange commit problem occured from the dev PC. Sounds like a timeout / DOS prevention setting issue in Apache.
Workaround: on the svn server:
- su www-data
- cd /tmp
- mkdir ullright
- cd ullright
- svn checkout file:///var/lib/subversion/public/ullright/trunk/ .
- follow the instructions above
- cd ..
- rm ullright -rf
Explanation of patches
symfony:
- We use lime 2
- lib/vendor/symfony/lib/vendor/lime/ contains the lime2 lib files
- Mobile device support: fallback to normal html template if no mobile template found
- We use the plugin test tasks patch to allow running tests packaged with the plugins
- sfBrowser patch: rethrow sfForm exceptions
- textHelper _auto_link_email_addresses() does not link emails with a preceeding tabstop
- UrlHelper, AssetHelper: replace spaces with percent %20 for "img" tag and "a" tag
- UrlHelper2: link_to does not crash websites anymore by triggering a PHP notice instead of an exception
- sfCommonFilter: use sfCombinePlugin's get_asset() helpers. Do not use the helpers in _html_head.php. They won't include e.g. a css defined in a partial used in the global layout.
- sfController: Somehow the functionality described for settings.yml does not work.
http://symfony.com/legacy/doc/gentle-introduction/1_4/en/19-Mastering-Symfony-s-Configuration-Files *
default/disabled action is not executed for a disabled module.
Therefore we hardcoded it into lib/vendor/symfony/lib/controller/sfController.class.php:L101
doctrine:
- Revert faulty doctrine patch concerning sluggable
- Fix evictAll() error message
- http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/Doctrine_Connection_evictAll.patch
- @see http://www.devcomments.com/The-function-evictAll-is-called-on-Doctrine-Table-but-the-object-at34926.htm
- This happend in a few functional tests. Should be further investigated.
- /test/unit/ullTableTool/ullGeneratorToolsTest............................not ok
Warnings:
PHP Fatal error: Call to a member function evictAll() on a non-object in /var/www/ullright/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
Errors:
Call to a member function evictAll() on a non-object
- /test/unit/ullTableTool/ullTableConfigurationTest........................not ok
Warnings:
PHP Fatal error: Call to a member function evictAll() on a non-object in /var/www/ullright/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Connection.php on line 1239
Errors:
Call to a member function evictAll() on a non-object
- /test/unit/ullTableTool/ullGeneratorToolsTest............................not ok
- UnitOfWork::buildFlushTree()
- http://trac.ullright.org/browser/trunk/plugins/ullCorePlugin/patch/Doctrine_UnitOfWork_buildFlushTree.patch
- Problem with fixture loading due to UllUser self-reference
User maintained symfony
Not in use. Too many side effects and BC breaks
Check it out: User maintained symfony1 https://github.com/LExpress/symfony1
http://afsy.fr/avent/2013/09-symfony-1-5-notre-fork-de-symfony1
Currently using Symfony 1.4.20 + sfToolkit, sfInflector, sfWebResponse for PHP 5.5 compatibility from link above.
WORK IN PROGRESS!
- cd /var/www/ullright
- composer.phar init
- composer.phar require lexpress/symfony1 "1.5.*"
- composer.phar require lexpress/doctrine1
- composer.phar install
- ...
- patching
- patch -p 0 < plugins/ullCorePlugin/patch/Sluggable.patch
- patch -p 0 < plugins/ullCorePlugin/patch/Doctrine_Connection_evictAll.patch
- patch -p 0 < plugins/ullCorePlugin/patch/Doctrine_UnitOfWork_buildFlushTree.patch
- patch -p 0 -F 10 < plugins/ullCorePlugin/patch/pluginTestTasks.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfBrowser.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfView.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper2.patch
- patch -p 0 < plugins/ullCorePlugin/patch/TextHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfBaseTask.patch
- patch -p 0 < plugins/ullCorePlugin/patch/UrlHelper.patch
github.com/LExpress/symfony1
- svn remove lib/vendor/symfony/
- svn commit -m "Removing old symfony version for upgrade"
- svn export https://github.com/LExpress/symfony1/trunk lib/vendor/symfony
- Get doctrine with ullright patches
- svn export -r4192 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine
- Replace lime2
- rm -r lib/vendor/symfony/lib/vendor/lime/
- svn export -r3479 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/vendor/lime/@3479 lib/vendor/symfony/lib/vendor/lime/
- Add mobile error templates
- svn export -r3460 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/exception/data/error.mobile.php@3460 lib/vendor/symfony/lib/exception/data/error.mobile.php
- svn export -r3460 http://svn.ull.at/svn/ullright/trunk/lib/vendor/symfony/lib/exception/data/exception.mobile.php@3460 lib/vendor/symfony/lib/exception/data/exception.mobile.php
- patching
- patch -p 0 < plugins/ullCorePlugin/patch/pluginTestTasks.patch
- patching file lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php
Hunk #2 succeeded at 322 (offset 1 line).
Hunk #3 succeeded at 379 (offset 1 line).
Hunk #4 succeeded at 442 (offset 1 line).
Hunk #5 succeeded at 480 (offset 1 line).
Hunk #6 FAILED at 649.
1 out of 6 hunks FAILED -- saving rejects to file lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php.rej
patching file lib/vendor/symfony/lib/task/test/sfTestAllTask.class.php
Hunk #1 succeeded at 27 with fuzz 2 (offset 1 line).
Hunk #3 succeeded at 121 (offset 6 lines).
patching file lib/vendor/symfony/lib/task/test/sfTestBaseTask.class.php
Hunk #1 FAILED at 3.
Hunk #2 succeeded at 59 with fuzz 2 (offset 24 lines).
1 out of 2 hunks FAILED -- saving rejects to file lib/vendor/symfony/lib/task/test/sfTestBaseTask.class.php.rej
patching file lib/vendor/symfony/lib/task/test/sfTestFunctionalTask.class.php
Hunk #2 succeeded at 38 (offset -1 lines).
Hunk #3 succeeded at 74 (offset -1 lines).
Hunk #4 succeeded at 95 (offset -1 lines).
Hunk #5 succeeded at 120 (offset -1 lines).
patching file lib/vendor/symfony/lib/task/test/sfTestUnitTask.class.php
Hunk #1 succeeded at 29 with fuzz 1.
Hunk #2 succeeded at 56 (offset -1 lines).
Hunk #3 succeeded at 84 (offset -1 lines).
- patching file lib/vendor/symfony/lib/config/sfProjectConfiguration.class.php
- patch -p 0 < plugins/ullCorePlugin/patch/sfBrowser.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfView.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/AssetHelper2.patch
- patch -p 0 < plugins/ullCorePlugin/patch/TextHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/sfBaseTask.patch
- patch -p 0 < plugins/ullCorePlugin/patch/UrlHelper.patch
- patch -p 0 < plugins/ullCorePlugin/patch/pluginTestTasks.patch