Skip to content

Commit 985499f

Browse files
committed
Merge branch 'master' into merge-upstream
# Conflicts: # lib/validator/sfValidatorBoolean.class.php
2 parents 9e5fa52 + de1836e commit 985499f

25 files changed

+146
-79
lines changed

.gitmodules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
branch = 5.x
55
[submodule "lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine"]
66
path = lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine
7-
url = https://github.com/LExpress/doctrine1.git
7+
url = https://github.com/FriendsOfSymfony1/doctrine1.git

.travis.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,45 @@
1+
os: linux
2+
dist: xenial
13
language: php
24

35
php:
4-
- 5.5
5-
- 5.6
66
- 7.0
77
- 7.1
88
- 7.2
9+
- 7.3
10+
- 7.4
911
- nightly
1012

1113
# run build against nightly but allow them to fail
12-
matrix:
14+
jobs:
1315
fast_finish: true
1416
allow_failures:
1517
- php: nightly
1618
include:
1719
- php: 5.3
1820
dist: precise
19-
sudo: required
2021
- php: 5.4
2122
dist: precise
22-
sudo: required
23-
24-
# faster builds on new travis setup not using sudo
25-
sudo: false
23+
- php: 5.5
24+
dist: trusty
25+
- php: 5.6
26+
dist: trusty
2627

2728
services:
2829
- memcached
2930

30-
# cache vendor dirs
3131
cache:
3232
directories:
33-
- lib/vendor/swiftmailer
3433
- $HOME/.composer/cache
3534

36-
install:
37-
- composer self-update
35+
before_install:
36+
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
37+
- sh -c 'if [ $(php -r "echo PHP_RELEASE_VERSION;") -le 98 ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
3838

39-
before_script:
39+
install:
4040
# by default, --remote is not used on travis
4141
- git submodule update --remote --force
42-
- sh -c 'if [ $(php -r "echo PHP_MINOR_VERSION;") -le 4 ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = apc.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
43-
- sh -c 'if [ $(php -r "echo PHP_RELEASE_VERSION;") -le 98 ] && [ $(php -r "echo PHP_MAJOR_VERSION;") -le 5 ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
44-
- composer install
42+
- composer install --prefer-dist --no-progress --no-suggest -o
4543

4644
script:
4745
- php data/bin/check_configuration.php

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,22 @@
11
CHANGELOG
22
=========
33

4+
08/06/2020: Version 1.5.13
5+
--------------------------
6+
7+
* Fix for `Warning: ini_set(): A session is active...` #229
8+
* Php 7.4 Incompatibility Fixes #228
9+
* Remove notice appeared on php 7.4 #230
10+
* Rename package to `friendsofsymfony1/symfony1` #231
11+
12+
03/04/2020: Version 1.5.12
13+
--------------------------
14+
15+
* Move project from @LExpress to @FriendsOfSymfony1
16+
* Some doc & readme update
17+
* Fixes for PHP 7.3 & 7.4 (thanks @W0rma for the code and @alquerci for the review) #224
18+
* Backport fix for cve-2019-18888 by @adrienperonnet #218
19+
420
17/03/2018: Version 1.5.11
521
--------------------------
622

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
[![Build Status](https://secure.travis-ci.org/LExpress/symfony1.png?branch=master)](http://travis-ci.org/LExpress/symfony1)
1+
[![Build Status](https://secure.travis-ci.org/FriendsOfSymfony1/symfony1.png?branch=master)](http://travis-ci.org/FriendsOfSymfony1/symfony1)
22

33
About this version
44
------------------
55

66
This is a community driven fork of symfony 1, as official support has been [interrupted in November 2012](http://symfony.com/blog/symfony-1-4-end-of-maintenance-what-does-it-mean).
77

8-
**Do not use it for new projects: this version is great to improve existing symfony1 applications, but [Symfony4](http://symfony.com/) is the way to go today.**
8+
**Do not use it for new projects: this version is great to improve existing symfony1 applications, but [Symfony5](http://symfony.com/) is the way to go today.**
99

10-
All the enhancements and BC breaks are listed in the [WHATS_NEW](https://github.com/LExpress/symfony1/blob/master/WHATS_NEW.md) file, this include:
10+
All the enhancements and BC breaks are listed in the [WHATS_NEW](https://github.com/FriendsOfSymfony1/symfony1/blob/master/WHATS_NEW.md) file, this include:
1111

12-
- [DIC](https://github.com/LExpress/symfony1/wiki/ServiceContainer)
12+
- [DIC](https://github.com/FriendsOfSymfony1/symfony1/wiki/ServiceContainer)
1313
- Composer support
1414
- PHP 7.2 support
1515
- performance boost
@@ -29,7 +29,7 @@ The end result of these advantages means there is no need to reinvent the wheel
2929
Symfony was written entirely in PHP 5.
3030
It has been thoroughly tested in various real-world projects, and is actually in use for high-demand e-business websites.
3131
It is compatible with most of the available databases engines, including MySQL, PostgreSQL, Oracle, and Microsoft SQL Server.
32-
It runs on *nix and Windows platforms.
32+
It runs on *nix and Windows platforms*.
3333

3434
Requirements
3535
------------
@@ -43,15 +43,15 @@ See http://symfony.com/legacy/doc/getting-started/1_4/en/03-Symfony-Installation
4343

4444
Option 1: Using [Composer](http://getcomposer.org/doc/00-intro.md) as dependency management:
4545

46-
composer require lexpress/symfony1 "1.5.*"
46+
composer require friendsofsymfony1/symfony1 "1.5.*"
4747
composer install
4848

4949
Note: On windows, if your project is a few directories down from the drive root, composer can throw an error relating to ZipArchive::extractTo(), this can be because pathnames are too long. There currently appears to be no proper solution but a workaround is to move your project to the drive root, run the commands from there, where they will run happily, and then move your project back.
5050

5151
Option 2: Using Git submodules:
5252

5353
git init # your project
54-
git submodule add https://github.com/LExpress/symfony1.git lib/vendor/symfony
54+
git submodule add https://github.com/FriendsOfSymfony1/symfony1.git lib/vendor/symfony
5555
git submodule update --init --recursive
5656

5757
Documentation

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
{
2-
"name": "lexpress/symfony1",
2+
"name": "friendsofsymfony1/symfony1",
33
"description": "Fork of symfony 1.4 with dic, form enhancements, latest swiftmailer and better performance",
4+
"type": "library",
45
"license": "MIT",
56
"require": {
6-
"swiftmailer/swiftmailer": "~5.2"
7+
"php" : ">=5.3.0",
8+
"swiftmailer/swiftmailer": "~5.2 || ^6.0"
79
},
810
"require-dev": {
911
"psr/log": "*"
1012
},
11-
"type": "library",
1213
"autoload": {
1314
"files": ["autoload.php"]
1415
},
1516
"suggest": {
16-
"lexpress/doctrine1": "Doctrine plugin",
17+
"friendsofsymfony1/doctrine1": "Doctrine plugin",
1718
"propel/sf-propel-o-r-m-plugin": "Propel plugin",
1819
"psr/log": "Psr logger"
1920
},
@@ -22,5 +23,8 @@
2223
"dev-master": "1.5-dev"
2324
}
2425
},
26+
"replace": {
27+
"lexpress/symfony1": "^1.5"
28+
},
2529
"bin": ["data/bin/symfony"]
2630
}

lib/autoload/sfCoreAutoload.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
/**
1212
* The current symfony version.
1313
*/
14-
define('SYMFONY_VERSION', '1.5.12-dev');
14+
define('SYMFONY_VERSION', '1.5.14-dev');
1515

1616
/**
1717
* sfCoreAutoload class.

lib/config/sfFactoryConfigHandler.class.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ public function execute($configFiles)
109109
unset($parameters['database']);
110110
}
111111

112+
if (isset($config['user']['param']['timeout'])) {
113+
$defaultParameters[] = sprintf("'gc_maxlifetime' => %d,", $config['user']['param']['timeout']);
114+
}
115+
112116
$instances[] = sprintf(" \$class = sfConfig::get('sf_factory_storage', '%s');\n \$this->factories['storage'] = new \$class(array_merge(array(\n%s\n), sfConfig::get('sf_factory_storage_parameters', %s)));", $class, implode("\n", $defaultParameters), var_export($parameters, true));
113117
break;
114118

lib/controller/sfWebController.class.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ abstract class sfWebController extends sfController
2323
/**
2424
* Generates an URL from an array of parameters.
2525
*
26-
* @param mixed $parameters An associative array of URL parameters or an internal URI as a string.
27-
* @param boolean $absolute Whether to generate an absolute URL
26+
* @param string|array $parameters An associative array of URL parameters or an internal URI as a string.
27+
* @param boolean $absolute Whether to generate an absolute URL
2828
*
2929
* @return string A URL to a symfony resource
3030
*/
@@ -168,10 +168,10 @@ public function convertUrlStringToParameters($url)
168168
/**
169169
* Redirects the request to another URL.
170170
*
171-
* @param string $url An associative array of URL parameters or an internal URI as a string
172-
* @param int $delay A delay in seconds before redirecting. This is only needed on
173-
* browsers that do not support HTTP headers
174-
* @param int $statusCode The status code
171+
* @param string|array $url An associative array of URL parameters or an internal URI as a string
172+
* @param int $delay A delay in seconds before redirecting. This is only needed on
173+
* browsers that do not support HTTP headers
174+
* @param int $statusCode The status code
175175
*
176176
* @throws InvalidArgumentException If the url argument is null or an empty string
177177
*/

lib/form/sfForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,14 @@ class sfForm implements ArrayAccess, Iterator, Countable
6363
*/
6464
public function __construct($defaults = array(), $options = array(), $CSRFSecret = null)
6565
{
66-
$this->setDefaults($defaults);
6766
$this->options = $options;
6867
$this->localCSRFSecret = $CSRFSecret;
6968

7069
$this->validatorSchema = new sfValidatorSchema();
7170
$this->widgetSchema = new sfWidgetFormSchema();
7271
$this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);
7372

73+
$this->setDefaults($defaults);
7474
$this->setup();
7575
$this->configure();
7676

lib/helper/UrlHelper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@ function _encodeText($text)
630630

631631
for ($i = 0; $i < strlen($text); $i++)
632632
{
633-
$char = $text{$i};
633+
$char = $text[$i];
634634
$r = mt_rand(0, 100);
635635

636636
# roughly 10% raw, 45% hex, 45% dec

0 commit comments

Comments
 (0)