Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
1.8.2 - Thursday 20 February 2026
1.8.2 - Thursday 04 March 2026
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- Fixed: PHP 8.5 deprecation of using 'null' as an array key, switch to ''.
- Fixed: PHP 8.5 deprecation of SplObjectStorage::contains(), detach(), and attach().
- Fixed: PHP 8.4 deprecation of implicit nullable parameter types in ezcPersistentSaveHandler::saveInternal().
- Fixed: PHP 8.4 deprecation of implicit nullable parameter types in ezcPersistentObjectIdProperty::__construct().
- Fixed: PHP 8.4 deprecation of implicit nullable parameter types in ezcPersistentObjectDefinition::__construct().
- Fixed: PHP 8.4 deprecation of implicit nullable parameter types in ezcPersistentSessionIdentityDecorator::__construct().
- Fixed: PHP 8.4 deprecation of implicit nullable parameter types in ezcPersistentIdentity::__construct().
- Fixed: PHP 8.3 deprecation of dynamic property creation.
- Fixed: PHP 8.1 deprecation of non-covariant return types in ezcPersistentFindIterator::rewind(), current(), key(), next() and valid().
- Fixed: PHP 8.1 deprecation of non-covariant return types in ezcPersistentIdentityFindIterator::next().
- Fixed: PHP 8.1 deprecation of non-covariant return types in ezcPersistentRelationCollection::offsetSet(), exchangeArray(), setFlags() and append().
Expand Down
12 changes: 6 additions & 6 deletions src/identity_maps/basic.php
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ public function addRelatedObject( $sourceObject, $relatedObject, $relationName =
$relStore[$relId] = $relatedObject;

// Store new reference
$this->identities[$relClass][$relId]->references->attach(
$this->identities[$relClass][$relId]->references->offsetSet(
$relStore
);

Expand Down Expand Up @@ -530,15 +530,15 @@ public function removeRelatedObject( $sourceObject, $relatedObject, $relationNam
if ( isset( $srcIdentity->relatedObjects[$relationStoreName] ) )
{
unset( $srcIdentity->relatedObjects[$relationStoreName][$relId] );
$relIdentity->references->detach( $srcIdentity->relatedObjects[$relationStoreName] );
$relIdentity->references->offsetUnset( $srcIdentity->relatedObjects[$relationStoreName] );
}

foreach ( $srcIdentity->namedRelatedObjectSets as $setName => $rels )
{
if ( isset( $rels[$relId] ) && $rels[$relId] instanceof $relClass )
{
unset( $srcIdentity->namedRelatedObjectSets[$setName][$relId] );
$relIdentity->references->detach(
$relIdentity->references->offsetUnset(
$srcIdentity->namedRelatedObjectSets[$setName]
);
}
Expand Down Expand Up @@ -693,10 +693,10 @@ protected function removeReferences( ArrayObject $set )
$def = $this->definitionManager->fetchDefinition( $class );
$state = $obj->getState();
$id = $state[$def->idProperty->propertyName];
if ( $this->identities[$class][$id]->references->contains( $set ) )

if ( $this->identities[$class][$id]->references->offsetExists( $set ) )
{
$this->identities[$class][$id]->references->detach( $set );
$this->identities[$class][$id]->references->offsetUnset( $set );
}
}
}
Expand Down
16 changes: 8 additions & 8 deletions src/persistent_session_instance.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
*
* http://www.apache.org/licenses/LICENSE-2.0
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
Expand Down Expand Up @@ -54,7 +54,7 @@ class ezcPersistentSessionInstance
* @see ezcPersistentSessionInstance::get()
* @var string
*/
static private $defaultInstanceIdentifier = null;
static private $defaultInstanceIdentifier = '';

/**
* Holds the session instances.
Expand All @@ -79,9 +79,9 @@ class ezcPersistentSessionInstance
* @param string $identifier
* @return ezcPersistentSession
*/
public static function get( $identifier = null )
public static function get( $identifier = '' )
{
if ( $identifier === null && self::$defaultInstanceIdentifier )
if ( $identifier === '' && self::$defaultInstanceIdentifier )
{
$identifier = self::$defaultInstanceIdentifier;
}
Expand Down Expand Up @@ -115,9 +115,9 @@ public static function get( $identifier = null )
* @param string $identifier the identifier of the database handler
* @return void
*/
public static function set( ezcPersistentSessionFoundation $session, $identifier = null )
public static function set( ezcPersistentSessionFoundation $session, $identifier = '' )
{
if ( $identifier === null )
if ( $identifier === '' )
{
$identifier = self::$defaultInstanceIdentifier;
}
Expand Down Expand Up @@ -157,7 +157,7 @@ public static function resetDefault()
*/
public static function reset()
{
self::$defaultInstanceIdentifier = null;
self::$defaultInstanceIdentifier = '';
self::$instances = array();
}
}
Expand Down
Loading