Skip to content

Commit 4ae7334

Browse files
Fixed deprecation notices in string interpolation with PHP 8.2 (#205)
1 parent aa086db commit 4ae7334

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

src/bundle/Core/DependencyInjection/IbexaCoreExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -782,7 +782,7 @@ private function configureGenericSetup(ContainerBuilder $container): void
782782

783783
// Cache settings
784784
// If CACHE_POOL env variable is set, check if there is a yml file that needs to be loaded for it
785-
if (($pool = $_SERVER['CACHE_POOL'] ?? false) && file_exists($projectDir . "/config/packages/cache_pool/${pool}.yaml")) {
785+
if (($pool = $_SERVER['CACHE_POOL'] ?? false) && file_exists($projectDir . "/config/packages/cache_pool/$pool.yaml")) {
786786
$loader = new Loader\YamlFileLoader($container, new FileLocator($projectDir . '/config/packages/cache_pool'));
787787
$loader->load($pool . '.yaml');
788788
}

src/bundle/Core/Features/Context/UserContext.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ public function assertUserWithNameExistsWithFields($username, TableNode $table)
544544
*/
545545
private function findNonExistingUserEmail($username = 'User')
546546
{
547-
$email = "${username}@ibexa.co";
547+
$email = "{$username}@ibexa.co";
548548
if ($this->checkUserExistenceByEmail($email)) {
549549
return $email;
550550
}

src/lib/FieldType/GatewayBasedStorage.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ protected function getGateway(array $context)
8787
);
8888

8989
if (!isset($this->gateways[$context['identifier']])) {
90-
throw new \OutOfBoundsException("No gateway for ${context['identifier']} available.");
90+
throw new \OutOfBoundsException("No gateway for $context[identifier] available.");
9191
}
9292

9393
$gateway = $this->gateways[$context['identifier']];

src/lib/Persistence/Cache/ContentHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ public function copy($contentId, $versionNo = null, $newOwnerId = null)
131131
*/
132132
public function load($contentId, $versionNo = null, array $translations = null)
133133
{
134-
$keySuffix = $versionNo ? "-${versionNo}-" : '-';
134+
$keySuffix = $versionNo ? "-{$versionNo}-" : '-';
135135
$keySuffix .= empty($translations) ? self::ALL_TRANSLATIONS_KEY : implode('|', $translations);
136136

137137
return $this->getCacheValue(
@@ -238,7 +238,7 @@ function () use ($remoteId) {
238238
*/
239239
public function loadVersionInfo($contentId, $versionNo = null)
240240
{
241-
$keySuffix = $versionNo ? "-${versionNo}" : '';
241+
$keySuffix = $versionNo ? "-{$versionNo}" : '';
242242
$cacheItem = $this->cache->getItem(
243243
$this->cacheIdentifierGenerator->generateKey(
244244
self::CONTENT_VERSION_INFO_IDENTIFIER,

tests/integration/Core/Repository/BaseTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ protected function getSetupFactory(): SetupFactory
173173
if (null === $this->setupFactory) {
174174
if (false === ($setupClass = getenv('setupFactory'))) {
175175
$setupClass = LegacySetupFactory::class;
176-
putenv("setupFactory=${setupClass}");
176+
putenv("setupFactory=$setupClass");
177177
}
178178

179179
if (false === getenv('fixtureDir')) {

tests/integration/Core/Repository/ContentTypeServiceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -874,7 +874,7 @@ public function testCreateContentTypeStructValues(array $data)
874874
$this->assertEquals(
875875
$typeCreate->$propertyName,
876876
$contentType->$propertyName,
877-
"Did not assert that property '${propertyName}' is equal on struct and resulting value object"
877+
"Did not assert that property '$propertyName' is equal on struct and resulting value object"
878878
);
879879
break;
880880
}

0 commit comments

Comments
 (0)