You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Fix tests to be able to finish it without a fatal error
Execute record generator related test first
* Fix tests for relationship fetch order when the order is not explicitly set on the query
* Fix PHP 7 compatibility about deep isset() on class that implement ArrayAccess
Fix comments for record filter
* Mark as known bug, integer validation with numbers greater than PHP_INT_MAX
* Fix test for export to XML
* Fix PHP 7.4 compatibility
* Add zlib required PHP extension on composer configuration
* Fix code structure about always close connections after each test
Co-authored-by: Emanuele Panzeri <thepanz@gmail.com>
* Add consistent local environment for testing with docker and docker-compose (FriendsOfSymfony1#86)
Related to FriendsOfSymfony1/symfony1#261
Co-authored-by: Emanuele Panzeri <thepanz@gmail.com>
* Update Builder.php for PHP8 compatibility (FriendsOfSymfony1#82)
Fix mandatory value for array $emittedActAs (PHP 8 compatibility)
* PHP 8.0 > Typing of internal function parameters do not allow null value anymore.
Method str_replace/strtotime now require a string, not null
FIX: PDOStatement::fetch, $cursorOffset must be a int
Doctrine_Connection_Statement->fetch() default value to null
FIX: Private methods cannot be final as they are never overridden by other classes
Doctrine_Query_Having->_parseAliases(), remove "final"
* PHP 8.1 > Compatibility
sfYamlInline, backport fix from Symfony1.
Doctrine_Hydrator_Graph fix array_map, rtrim(): Passing null to parameter #1 ($string) of type string is deprecated
I emmit the hypothese that this array_map was broken, because array_map result is not assigned.
Doctrine_Migration_Diff:333, str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated
Doctrine_Migration_Builder:78:, is_dir(): Passing null to parameter #1 ($filename) of type string is deprecated
Doctrine_Validator_Notblank, allow null value
HydrationListener, in HydrateTestCase.php, fix strtoupper(): Passing null to parameter #1 ($string) of type string is deprecated
internal_method_return_types
https://wiki.php.net/rfc/internal_method_return_types
see 2b2d173 for details
Doctrine_Collection_OnDemand
Doctrine_Validator_Exception
PHP 8.1 PDO stringify is now disable by default.
Activate it for Mysql + Sqlite
https://www.php.net/manual/en/migration81.incompatible.php#migration81.incompatible.pdo.mysql
PHP 8.1 Fix: Warning: strtotime() : Epoch doesn't fit in a PHP integer in Doctrine_Record.
This is only happening on 32bit system, because int 32bit could not map the whole strtotime date scope.
Example value: "0000-00-00 00:00:00"
Before 8.1 strtotime returns false, after it return false but also raise a Warning.
@ is slightly lowering performance, it should not trigger any unwanted error, as if format is invalid strtotime should return "false"
As this old project need BC for old system, seems the best fix.
PHP 8.1 > Automatic conversion of false to array is deprecated
Fix Doctrine_Record _invokedSaveHooks cannot assign array value to boolean
Declaration to array instead of boolean
PHP 8.1 > Serializable Phase Out
https://wiki.php.net/rfc/phase_out_serializable
PHP 7.4 add a new Serialize mecanism
PHP 8.1 made old method, "Serializable implementation" deprecated
PHP 9.0 (no release date at this moment) will drop the support.
Temporary Fix: Adding both method serialize/unserialize and __serialize/__unserialize
In order to be compatible with future PHP 9.0, once it will be release, we will have to drop the support to PHP Version before 7.4.
Currently a lot of Unix distribution in LTS are running a PHP Version older than 7.4 so moving to the final solution of "add return type" should break a lot of setup for the moment.
PHP 8.1 > internal_method_return_types
https://wiki.php.net/rfc/internal_method_return_types
PHP 8.0 added return type for abstract methods on Iterator, ArrayAccess, Countable, IteratorAggregate
PHP 8.1 made non implementation as a Deprecated Warning
PHP 9.0 (no release date at this moment) will drop the support.
Temporary Fix : adding this Attribute
Will drop the Deprecated warning.
Adding return type will break compatibility before PHP 7.4,
Return type has been added on PHP 7.0, but "mixed" special type is required, and it has been added on PHP 7.4.
In order to be compatible with future PHP 9.0, once it will be release, we will have to drop the support to PHP Version before 7.4
Currently a lot of Unix distribution in LTS are running a PHP Version older than 7.4 so moving to the final solution of "add return type" should break a lot of setup for the moment.
Update Travis to PHP up to 8.1
PHP 8.0 > Doctrine_Query:36, uncaught TypeError: Unsupported operand types: string % int
Doctrine_Parser_Xml:89, htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated
https://wiki.php.net/rfc/internal_method_return_types for
Doctrine_Node
Doctrine_Adapter_Mock
Doctrine_EventListener_TestLogger
Doctrine_Parser_Xml
Doctrine_Ticket_1254_TestCase, replace stftime() by date() with format adaptation.
* PR Review - Small bug Fixes
Fix BC compatibility for any dev using fetch($currentOffset = null)
Fix SQLite Connect to return a boolean
Remove useless string cast by testing null before
Check TaskName declaration
Fix test 1783 - 64bit compatibility
On 32 bit system, PHP use a float to overflow a bigint.
On 64 bit, PHP int is the same as a database bigint, so this test is not relevant anymore
* Fix Annotation and Coding Style
* Add proof tast name with empty task name property sets by child class
* Use GitHub actions for Continuous Integration tests
Note: apparently a running MySQL service is not needed to run our tests
* Fix broken tests when not using shared mysql socket within docker containers
* Remove deprecated --no-suggest option from composer
* Update GitHub actions: run pipeline for PRs too
* PHP 8.1 > a few more ReturnTypeWillChange attributes added
* Flushing more than once causes a warning. Resetting $_collections to the initial state avoids it.
* Added type hint for arrays as the second parameter allows both, a string or an array.
* PHP 8.2 > Creation of dynamic property Class::$property is deprecated
* PHP 8.2 > Using ${var} in strings is deprecated, use {$var} instead.
* PHP 8.0 > Trying to access array offset on value of type bool
* PHP 8.2 > added test environment
* PHP 8.2 > Removed properties from Doctrine_RawSql and used _preQueried in case of clear() and moved the property _pendingJoinConditions fom Doctrine_Query up to Doctrine_Query_Abstract in the hierarchy.
* add double to type check. bug FriendsOfSymfony1#88
* PHP 8.1 > Deprecated: strtolower(): Passing null to parameter #1 ($string) of type string is deprecated
* removed automated testing for `php7.4` and `php8.0`
* removed duplicate methods from `Collection`
* Update(github) Update github workflows, use composer caches
* Fix array key access in lib/Doctrine/Import/Builder.php
Co-authored-by: Alexandre Quercia <alquerci@email.com>
* removed automated testing for old php versions
* CI: add PHP v8.3 to the CI pipelines (FriendsOfSymfony1#108)
* Remove PHP Pear configurations
* Update GitAttributes file
* Fix PHP deprecations on ArrayAccess and additional classes
* fix(Query): add failed test for column added twice with custom aliases
* Revert "Added fields with alias to pendingFields array, fixed DC-585"
This reverts commit e3ae69c.
* added missing `TRANSACTION` directives to `Mysql` connections
* Fix(Query): column added twice with custom aliases
* ANA-4734 Add trailing line break to base class files (#7)
* Fixed test 1325TestCase.php
* fix(tests) replace use of iconv in SearchTestCase.php
* add(composer): ext-iconv is now a requirement
* Adding columns defined in actAs-templates to the docblock of the generated model class.
* Update readme: we dont have 1.5 here
* Update min PHP version to v7.4 (FriendsOfSymfony1#122)
Co-authored-by: Emanuele Panzeri <thepanz@gmail.com>
Co-authored-by: Thomas <th@it-solutions-hirsch.de>
* Fix invalid docblock for Collection::fromArray()
* Remove unused variable from Collection::fromArray()
* [composer] add sort-packages
* introduce __DIR__ constants
* PHP 8.1 > ReturnTypeWillChange attributes added
* fixed CI tasks on relevant folders
---------
Co-authored-by: Alexandre Quercia <alquerci@email.com>
Co-authored-by: Emanuele Panzeri <thepanz@gmail.com>
Co-authored-by: xNatek <nathan.trenet@gmail.com>
Co-authored-by: Tybaze <tybaze@users.noreply.github.com>
Co-authored-by: Ben Tybaze <6998932+Tybaze@users.noreply.github.com>
Co-authored-by: Thomas A. Hirsch <thomas.hirsch@vema-eg.de>
Co-authored-by: Karoly Gossler <connor@connor.hu>
Co-authored-by: Patrick Pfähler <10995809+paddyhamburg@users.noreply.github.com>
Co-authored-by: Alex Coles <alexcoles@users.noreply.github.com>
Co-authored-by: Thomas <th@it-solutions-hirsch.de>
Co-authored-by: Sergei Miami <miami@blackcrystal.net>
// The relationship must be fetched in order to check the field existence.
72
72
// Related to PHP-7.0 compatibility so an explicit call to method get is required.
73
73
$record[$alias];
74
74
75
-
if (!$record->exists()) {
76
-
if (isset($record[$alias][$property_or_relation])) {
77
-
$record[$alias][$property_or_relation] = $value;
75
+
if ( ! $record->exists()) {
76
+
if (isset($record[$alias][$propertyOrRelation])) {
77
+
$record[$alias][$propertyOrRelation] = $value;
78
78
79
79
return$record;
80
80
}
81
81
} else {
82
-
if (isset($record[$alias][$property_or_relation])) {
83
-
$record[$alias][$property_or_relation] = $value;
82
+
if (isset($record[$alias][$propertyOrRelation])) {
83
+
$record[$alias][$propertyOrRelation] = $value;
84
84
}
85
85
86
86
return$record;
87
87
}
88
88
}
89
-
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $property_or_relation, get_class($record)));
89
+
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
90
90
}
91
91
92
92
/**
93
93
* Provides a way for getting property or relation value from the given record.
94
94
*
95
-
* @param string $property_or_relation
95
+
* @param string $propertyOrRelation
96
96
*
97
97
* @return mixed
98
98
*
99
99
* @thrown Doctrine_Record_UnknownPropertyException when this way is not available
// The relationship must be fetched in order to check the field existence.
105
105
// Related to PHP-7.0 compatibility so an explicit call to method get is required.
106
106
$record[$alias];
107
107
108
-
if (!$record->exists()) {
109
-
if (isset($record[$alias][$property_or_relation])) {
110
-
return$record[$alias][$property_or_relation];
108
+
if ( ! $record->exists()) {
109
+
if (isset($record[$alias][$propertyOrRelation])) {
111
110
}
112
111
} else {
113
-
if (isset($record[$alias][$property_or_relation])) {
114
-
return$record[$alias][$property_or_relation];
112
+
if (isset($record[$alias][$propertyOrRelation])) {
113
+
return$record[$alias][$propertyOrRelation];
115
114
}
116
115
}
117
116
}
118
-
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $property_or_relation, get_class($record)));
117
+
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $property_or_relation, get_class($record)));
43
+
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $property_or_relation, get_class($record)));
53
+
thrownewDoctrine_Record_UnknownPropertyException(sprintf('Unknown record property / related component "%s" on "%s"', $propertyOrRelation, get_class($record)));
$this->assertEqual($this->adapter->pop(), 'CREATE TABLE cms__category_languages (id BIGINT AUTO_INCREMENT, name TEXT, category_id BIGINT, language_id BIGINT, INDEX index_category_idx (category_id), INDEX index_language_idx (language_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB');
104
-
$this->assertEqual($this->adapter->pop(), 'CREATE TABLE cms__category (id BIGINT AUTO_INCREMENT, created DATETIME, parent BIGINT, position MEDIUMINT, active BIGINT, INDEX index_parent_idx (parent), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB');
104
+
$this->assertEqual($this->adapter->pop(), 'CREATE TABLE cms__category (id BIGINT AUTO_INCREMENT, created DATETIME, parent BIGINT, position MEDIUMINT, active BIGINT, INDEX index_parent_idx (parent), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = INNODB');
0 commit comments