Releases: propelorm/Propel2
2.0.0-beta4
What's Changed
- Allow Symfony v7 by @Leonardo-Atalla in #1992
- Make compatible with 8.2 ArrayIterator interface updates by @oojacoboo in #1987
- PHP8.2 - Using ${var} in strings is deprecated, use {$var} instead by @scp in #1985
- Fix broken test on Postgres with PHP 8.2 by @mringler in #1980
- Fix tests after Symfony PropertyInfo update by @mringler in #1973
- Fix up PHPStan errors. by @michbeck in #1955
- Avoid name collision in cross-ref relations by @mringler in #1963
- Support ON UPDATE CURRENT_TIMESTAMP in MySQL by @Mau04 in #1967
New Contributors
- @Mau04 made their first contribution in #1967
- @scp made their first contribution in #1985
- @Leonardo-Atalla made their first contribution in #1992
Full Changelog: 2.0.0-beta3...2.0.0-beta4
2.0.0-beta3
With this release, we continue Beta-version releasing toward API stabilization.
The main changes include:
- Added Monolog v3 support
- Performance improvement: Load databases without accessing classes by @mringler in #1910
- Load table maps lazily by @mringler in #1902
- Implemented migration rollback. by @romanhavrylko in #1932
- Add support for native UUID column type by @mringler in #1915
- Add type to store UUIDs as binary (UUID_BINARY) by @mringler in #1917
- Remove deprecated setter by @mringler in #1892
- Fix invalid duplicate indices using
ArchivableBehavior
for some platforms by @felixgeyer in #1904 - Fix duplicate indices when converting unique index to index by @felixgeyer in #1903
- Fixed input type of findBy hints by @mringler in #1912
- Docblock query class fixes by @mringler in #1913
- Create IN filter expressions for subqueries by @mringler in #1920
- UUID adjustments for MariaDB by @mringler in #1924
- Added PHPStan Level 7 support by @dereuromark in #1938
- Allowed better management of foreign keys by managing foreign keys on archivable behavior by @mringler in #1935
- Fix CS for array in PHP generated files. by @dereuromark in #1940
- Fix up PHPStan errors. by @dereuromark in #1948
- Fix up DateTime PHPStan error. by @dereuromark in #1947
- Fixed CS and removed silencing in config. by @michbeck in #1949
- Fix up IDE found errors/problems. by @dereuromark in #1950
- Fixes PHPStan errors, set PHPStan to level 7 by @michbeck in #1951
- Fix up in array strictness for string value comparison. by @dereuromark in #1953
- Fix up redundant type casts by @michbeck in #1954
- Docblock cleanup by @dereuromark in #1899
BC breaking impact
- Removed deprecated way to add primary key setter
setPrimaryKey()
for generated code.
New Contributors
- @romanhavrylko made their first contribution in #1932
- @michbeck made their first contribution in #1943
Full Changelog: 2.0.0-beta2...2.0.0-beta3
2.0.0-beta2
2.0.0-beta2
With this release, we continue Beta-version releasing toward API stabilization.
The main changes include:
- PHP 8.1 and 8.2 compatibility
- Added strict types to generated code
- Added Symfony 6 support
- Dropped Symfony 3 support. The minimum required Symfony version is 4.4.0 now.
- Added Monolog 2 support
- Added a type safe access to the
StandardServiceContainer
viaPropel::getStandardServiceContainer()
method - Added support for the
DATETIME
column type - Moved templates into own root level
- Overall code quality improvements
- Fixed
DatabaseComparator
in order to skip migration creation if table hasskipSql
flag - Fixed an issue with many-to-many mapping
- Fixed usage of deprecated date format
- Fixed column's time format issue
- Fixed issue with identifier quoting being ignored
- Fixed a debug mode behavior in order to use new connection with it
Many thanks to all the contributors!
@nederdirk @ikeyan @craigfrancis @jbarton123 @cristianoc72 @gharlan @javray @dereuromark @mringler @felixgeyer @oojacoboo @herasimenko1987 @fbourigault @manstie @asaulenko @dmytro-dymarchuk @yaroslav-spryker @DarkAxi0m @sacerro @geega @gechetspr
BC breaking impact
Please note that all methods have param and return types being added now where they were feasible and ensure better code quality.
Make sure any extensions are updated here regarding their method signature.
TIMESTAMP column type in schema files for the MySql databases now generates column with actual TIMESTAMP type instead of DATETIME as it was previously. Propel diff considers it as a table structure change and generates migration.
As another side effect timestamps are only valid until 2037 (32bit). Make sure to adjust any databuilders or fixtures accordingly.
2.0.0-beta1
2.0.0-beta1
With this release, we start Beta-version releasing toward API stabilization.
The main changes include:
- PHP 8.1 compatibility
- Fixes for PHP 7.4 preloading
- Fixed usage of default on-update and on-delete behavior
- Show names of uncommitted migrations
- BehaviorLocator now looks in dev packages, as well
- Aggregate multiple columns behavior & parameter list support
- Fixes around aliases and cross joins and subqueries
- Added support for
keytype
in the magic import/export methods - PSR naming fixes for variables and methods
- Reset partial flag when populating a relation
- Added
exists
operator - Escape quotes in behavior
- Quote primary table name if identifier quoting is enabled
- Formats insert
DATE
values asY-m-d
instead ofY-m-d H:i:s.u
- Allow default-value for concrete-inheritance to be instantiable
- Pluralize
Box
toBoxes
- Allow
NO ACTION
for foreign key references (in the dtd/xsd) - Use object-equality instead of reference-equality to compare object properties
- Generates data dictionary documentation
- PHPStan related code cleanup
Many thanks to all the contributors!
BC breaking impact
Please note that methods have param and return types being added now where they were feasible and ensure better code quality.
Make sure any extensions are updated here regarding their method signature.
Some internal methods were also renamed to fit PSR coding standards.
Due to the support of PHP 7.4 preloading, an update will need the configuration to be rebuilt once by calling config:convert
, see https://github.com/propelorm/Propel2/wiki/Exception-Target:-Loading-the-database#for-imported-configuration
2.0.0-alpha12
2.0.0-alpha12
The main changes include:
- PHP 8 compatibility
- Widening the range of Symfony v4 to 4.0+ (instead of 4.3+)
- Fixed transaction handling when \Throwable is thrown
- Fixed identifierQuoting for Versionable behavior
- Fixed invalid hydration when using mergeWith of criteria with "with" models
- Adds the ability for locking reads, either shared or exclusive
- Updated TableMap generator to add column name map for normalization and performance speedup
- Use temporal formatter in the toArray() generator, fixes the issue of entities wrongly being marked as dirty due to differences in the datetime formatting
Many thanks to contributors! @mruoss, @prgTW, @FranciszekKrasowski, @bezpiatovs, @chuongnh3atgmaildotcom, @kasparsj, @nederdirk, @cristianoc72, @stereomon, @dereuromark .
BC breaking impact
Please note that due to PHP7 + PHP8 versions both able to be supported with this library, the PDO access had to be refactored in a not fully BC way. Instead of directly extending the PHP core classes, we now depend on interface contracts.
If your software has directly extended those in the past, please make sure to adjust your extensions accordingly.
- PDOStatement => Propel\Runtime\Connection\StatementInterface
- PdoConnection extends PDO implements ConnectionInterface => only implements the latter and proxies to PDO instead.
2.0.0-alpha11
With this release, we continue Alpha-version cleanups aiming API stabilization.
Many thanks to our contributors, who made possible this release to come that fast. 👍
The main changes include:
- Fixed return value for "no migration needed" case in MigrationMigrateCommand
- Always create unique indices by constraint for Postgres (@daniel-rose)
- Do not try to fetch related objects of a new object (@gharlan)
- Map JSON type to native Postgres type (@tienbuide)
- Fixed nullable docblock for mutator methods (@dereuromark)
- PHP 7.2+ cleanups (class visibility modifiers, native types etc)
- Dropped EOL Symfony 2, Postgres 9.4 from test matrix
- Fixed docblocks and typehinting
- PHPStan level 5 static analyzing
- Yoda notation cleanup
2.0.0-alpha10
With this release, we continue Alpha-version cleanups aiming API stabilization. It's a good target for project updates, as it has the widest dependency list (including EOL components). In the following releases, we expect to reduce the support of EOL components.
Many thanks to our contributors, who made possible this release to come that fast. 👍
- Full support with Symfony components 2.7+, 3.3+, 4.0+, 5.0+ ( @Incognito )
- Adds support for MYSQL_ATTR_SSL_VERIFY_SERVER_CERT configuration option ( @marcusirgens )
- Fixed an issue where propel reverse breaks with system-versioned tables ( @zwhedbee )
- Applies PHPStan Level 1 Fixes, which corrects many warnings, type checks, missing types, and incorrect annotations. ( @dereuromark )
Some interesting commits in this release:
2da7387 Fix issue where propel reverse breaks with system-versioned tables (#1549)
4093a26 Allow option MYSQL_ATTR_SSL_VERIFY_SERVER_CERT to be set
584c40b Add PHPStan level 1 check with baseline until we can remove symf2.
c8a40ff Sf validator v5 (#1603)
78862a2 Start enforcing PHPStan level 1.
9ea8516 Make execute() compatible to Symf5 int only.
f3d47fd fix(PDO): Can't prepare query with BINARY_ALL criteria when ATTR_EMULATE_PREPARES is false
0027b1c sf validator in v3.0, v3.1 and v3.2 all have regex issues
db208d7 The symfony 4.2 Unique validator is not a suitable replacement for Propel's
5e4361f Special composer for php8 testing
09f6f3a Mysql test were incorrectly setup
7a71f8c Prevent infinite loops when database is not connecting
3328fe1 Symfony 5 enforces return types on execute method
8734275 Now with updated console to Sf v5
5b3db85 Requires phpunit fix for reflection on php7.4. 7.5.15 Also runs on php7.1 https://github.com/sebastianbergmann/phpunit/compare/7.5.14...7.5.15
9bc9162 sf 2.5 is about 5 years past EOL, dropping it reduces unpredictable codepaths and feature sniffing
9cde76f Properly register the translation dependency needed by the validation behaviour for sf >= 2.5
cec2867 FIX bug CLOB_EMU oracle
33503a6 Make travis run postgresql 12 (#1580)
171743a Fix SQLite sprintf() error (#1587)
5221ebc Works on Trusty but not Xenial or Bionic. Because 10.1 is only a few months form EOL, using Trust is acceptable for this. 10.1 tests should be removed in the coming months anyway.
40466af Enable MariaDB builds
c1b4361 Use PSR-4 autoloader
439b2b6 Raise code quality to PhpStan on lowest level 1
2.0.0-alpha9
With this small release, we start a series of upgrades and stabilization activities of Propel2,
which aim to end with the following stable 2.0 release. New dependencies will allow us to get
more feedback on compatibility issues and addressing them during the stabilization phase.
General
- Added compatibility PHP 7.4
- Added support of PSQL expressions [CURRENT_TIMESTAMP, LOCALTIMESTAMP]
- Allowed Symfony 5 dependency
- Removed PHP 5.x compatibility (with EOL 01.2019)
Tests
- Updated PHPUnit from 4.0/5.0 to 7.0
fce5f55 Keep tests for deprecated class.
d44d035 Use term primary/replica instead, deprecate in BC way.
4c45713 Small fixes for PHP 7.4
c2dbbbc Only generate calls to parent hooks, if the class being generated has a base class
3f4b70c Use stable php74
f6d20df Add Symfony 5 dependency compatibility
603d42c Rearrange implode() arguments where necessary to conform to php7.4
decc437 Dropping dead PHP EOL 5.5
d84c8e3 Update to PHP74 Travis and simplify matrix.
2.0.0-alpha8
This release contains several important fixes (including important security fix):
- SQL injection in
limit()
Criteria API. If you use this method from external input, update immediately your code base to cast the argument to int first or use 2.0.0-alpha8).
What happened? The method\Propel\Runtime\ActiveQuery\Criteria::setLimit
did not cast the$limit
automatically to an int, allowing to place any arbitrary SQL into this argument. You can fix the security vulnerability by casting manually you limit to int or update to newest Propel2 version.
public function pageAction(Request $request){
$posts = BlogPostQuery::create()
->filterByUser($user)
->offset($request->get('offset'))
->limit($request->get('limit')); //<-- vulnerability
return $posts;
}
Update your call to following to fix it:
->limit((int) $request->get('limit'));
- PHP php7.1+ compatibility
- Symfony 4 compatibility
4c309e3e - SQL injection fix: Cast limit to integer when setting via Criteria::setLimit() (#1465) <Mike Petrovich>
cd23d738 - Coerce offset and limit values to integers for MySQL LIMIT clause (#1464) <Mike Petrovich>
c64c0d61 - Format parameter can be null (#1462) <Timo Schwarzer>
3dde1043 - #1447. On preInsert object in TimestampableBehavior we get different dataTime. (#1457) <Eugene Kurasov>
80cda8a3 - Fix getPrimaryKeyFromRow for custom php types (#1397) <jaspervdm>
df9fefdc - Address failed tests after applying fix for issue #1425 (#1449) <Gomes>
1f6557d1 - Fix test suite and init command (#1452) <Cristiano Cinotti>
dbd225c5 - Make offsetGet compatible with the parent's offsetGet method (#1446) <Timo Schwarzer>
a2ebdfcc - Added referenceOnly attribute to external-schema (#1439) <Jonas Rudolph>
daba2c85 - address countable issue in php7.2 (#1425) <Chris Schuld>
98d584f8 - Added php 7.2 in travis (#1415) <Maxim>
79bffd5a - improved formatting speed (#1428) <Tomasz Wójcik>
3053018a - Symfony 4 compatibility (#1434) <Cristiano Cinotti>
315fd092 - Fix vendorInfo handling for foreign keys and add support for postgres deferrable FK constraints (#1418) <Nicolas FRANÇOIS>
a732a9db - Throw original exception in criteria file (#1422) <Maxim>
d24a474f - Fix issue #1406 : diff issue with CURRENT_TIMESTAMP on maria 10.2 (#1407) <wollanup>
9c3458a1 - Remove tailing hashes (#1401) <wdhwg001>
cd5d36d9 - Fix Gitter (#1402) <wdhwg001>
7b1e8325 - PHP Warning in Profiler (#1400) <Maxim>
e404ed8d - fix ObjectBuilder addFKAccessor reference to int (#1399) <ktret>
b589458e - spell DECIMAL correctly in isNumber function (#1398) <ktret>
c3e7a5c4 - Fix json equality check for json columns (#1396) <kriks57>
b4c13d64 - Fix MssqlAdapter::applyLimit from generating malformed queries when `from` is included as a non-keyword (#1395) <Chase>
6c3d6364 - Fix detection of subquery virtual columns in MssqlAdapter::applyLimit (#1382) <Chase>
efafd096 - Fix wrong string generation in PropelDateTime::getMicrotime <Marc J. Schmidt>
97314087 - Update Database.php (#1379) <Gula Andrij>
a00829fa - Fixed versionable behavior with incorrect constant (#1270) <gabor-kormany>
1b5ffef9 - Fix greedy regex incorrectly splitting query string with multiple FROM statements [Mssql] (#1375) <Chase>
6aa779ef - Check incomplete foreign-keys #675 (#1259) <atompulse>
1ab67865 - Fix broken boolean types on IniFileLoader (propelorm/Propel2#1355) (#1356) <Gregory Boddin>
9e4039d0 - Undefined method being called; issue #1352 (#1354) <AlexanderBliznuk>
fe18de34 - json type column for mysql 5.7 (#1372) <cedric lombardot>
02f085de - Allowing file loader to accept empty env vars (e.g. DB_PW) (#1373) <Avi Bueno>
5512c399 - Allows the use of Unsigned="true|false" as a MySQL vendor column parameter. (#1360) <Damien VERON>
b311676a - Support XML Inclusions in configuration, adds #1321 (#1322) <hakre>
618c1922 - Result of method Model::init*() (void) is used. (#1365) <Maxim>
4395623d - Fixed Om\Object::toArray when using DateTimeImmutable (#1359) <ricardoe>
e78bb96e - Fix remove spaces in empty line on windows (#1357) <Andrey>
ff113cdb - Test also php 7.1 (#1337) <Massimiliano Arione>
65c6515b - fix TableMapTrait.php (#1339) <CrayD>
bdca6fc2 - Validator fix (#1350) <Angel Koilov (po_taka)>
67bad146 - Revert "Update composer.json" (#1349) <Marc J. Schmidt>
0b31885e - Update composer.json (#1348) <Gula Andrij>
83a8bb97 - don't allow symfony/validator < 2.3 (#1342) <Gregor Harlan>
2a635ffd - Update PgsqlPlatform.php (#1338) <Oliwier Ptak>
b7c8ac90 - symfony/validator >= 3.2.2 is not supported anymore. <Marc J. Schmidt>
d81612c3 - fixed php7.1 implicit string to array cast <Marc J. Schmidt>
413aa52a - Changes description of filterBy function (#1334) <Maxim>
367878d0 - Fix regression in ObjectCollection of Collections. (#1330) <Peter Potrowl>
5026b534 - Fix php7.1 [] operator not supported for strings in (#1329) <cedric lombardot
2.0.0-alpha7
dc55788 - Fixes #1324 - fixed wrong sprintf arguments positioning in getIdentifierPhp()
21c75aa - Check 'alreadyInSave' before save transaction (#1309)
3fe9d62 - fix generated code formatting (#1304)
ea869c7 - array columns getter: return correct value for [0]
(#1302)
b1f8262 - persistent connections working again, Removed StatementInterface and PdoStatement (#1295)
38f1044 - removing leading space within the sqlite dsn (#1292)
398c343 - Use DATETIME2 to allow high precision timestamps (#1293)