Skip to content

Commit b7fe21d

Browse files
Merge branch '6.4' into 7.3
* 6.4: remove deprecated nullable option from primary key columns specific fix to avoid 'outag' when inflecting 'outages' [Process] Enhance hasSystemCallBeenInterrupted function for non-english locale [FrameworkBundle] Make `cache:warmup` warm up read-only caches
2 parents 138777a + b3b7847 commit b7fe21d

File tree

6 files changed

+24
-7
lines changed

6 files changed

+24
-7
lines changed

src/Symfony/Bridge/Doctrine/Tests/Fixtures/CompositeObjectNoToStringIdEntity.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@ class CompositeObjectNoToStringIdEntity
2222
public function __construct(
2323
#[ORM\Id]
2424
#[ORM\ManyToOne(cascade: ['persist'])]
25-
#[ORM\JoinColumn(name: 'object_one_id', nullable: false)]
25+
#[ORM\JoinColumn(name: 'object_one_id')]
2626
protected SingleIntIdNoToStringEntity $objectOne,
2727

2828
#[ORM\Id]
2929
#[ORM\ManyToOne(cascade: ['persist'])]
30-
#[ORM\JoinColumn(name: 'object_two_id', nullable: false)]
30+
#[ORM\JoinColumn(name: 'object_two_id')]
3131
protected SingleIntIdNoToStringEntity $objectTwo,
3232
) {
3333
}

src/Symfony/Bridge/Doctrine/Tests/Fixtures/SingleAssociationToIntIdEntity.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class SingleAssociationToIntIdEntity
2222
{
2323
public function __construct(
2424
#[Id, OneToOne(cascade: ['ALL'])]
25-
#[JoinColumn(nullable: false)]
25+
#[JoinColumn()]
2626
protected SingleIntIdNoToStringEntity $entity,
2727

2828
#[Column(nullable: true)]

src/Symfony/Bundle/FrameworkBundle/Command/CacheWarmupCommand.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
6969
$kernel->warmUp($cacheDir);
7070
}
7171

72-
$preload = $this->cacheWarmer->warmUp($cacheDir);
73-
7472
$buildDir = $kernel->getContainer()->getParameter('kernel.build_dir');
73+
74+
$preload = $this->cacheWarmer->warmUp($cacheDir, $buildDir);
75+
7576
if ($preload && $cacheDir === $buildDir && file_exists($preloadFile = $buildDir.'/'.$kernel->getContainer()->getParameter('kernel.container_class').'.preload.php')) {
7677
Preloader::append($preloadFile, $preload);
7778
}

src/Symfony/Component/Process/Pipes/AbstractPipes.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,26 @@ public function close(): void
5252

5353
/**
5454
* Returns true if a system call has been interrupted.
55+
*
56+
* stream_select() returns false when the `select` system call is interrupted by an incoming signal.
5557
*/
5658
protected function hasSystemCallBeenInterrupted(): bool
5759
{
5860
$lastError = $this->lastError;
5961
$this->lastError = null;
6062

61-
// stream_select returns false when the `select` system call is interrupted by an incoming signal
62-
return null !== $lastError && false !== stripos($lastError, 'interrupted system call');
63+
if (null === $lastError) {
64+
return false;
65+
}
66+
67+
if (false !== stripos($lastError, 'interrupted system call')) {
68+
return true;
69+
}
70+
71+
// on applications with a different locale than english, the message above is not found because
72+
// it's translated. So we also check for the SOCKET_EINTR constant which is defined under
73+
// Windows and UNIX-like platforms (if available on the platform).
74+
return \defined('SOCKET_EINTR') && str_starts_with($lastError, 'stream_select(): Unable to select ['.\SOCKET_EINTR.']');
6375
}
6476

6577
/**

src/Symfony/Component/String/Inflector/EnglishInflector.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,9 @@ final class EnglishInflector implements InflectorInterface
166166
// edges (edge)
167167
['segd', 4, true, true, 'dge'],
168168

169+
// outages (outage) - specific fix to avoid 'outag'
170+
['segatuo', 7, true, true, 'outage'],
171+
169172
// roses (rose), garages (garage), cassettes (cassette),
170173
// waltzes (waltz), heroes (hero), bushes (bush), arches (arch),
171174
// shoes (shoe)

src/Symfony/Component/String/Tests/Inflector/EnglishInflectorTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public static function singularizeProvider()
124124
['news', 'news'],
125125
['oases', ['oas', 'oase', 'oasis']],
126126
['objectives', 'objective'],
127+
['outages', 'outage'],
127128
['oxen', 'ox'],
128129
['parties', 'party'],
129130
['people', 'person'],

0 commit comments

Comments
 (0)