Skip to content

Commit

Permalink
Merge branch '7.1' into 7.2
Browse files Browse the repository at this point in the history
* 7.1:
  fix Twig 3.12 compatibility
  [Translation] Review Serbian translations
  Fix typos
  [DependencyInjection] Fix error message typo in YamlFileLoader
  Fix typo in exception message langage to language
  • Loading branch information
xabbuh committed Aug 29, 2024
2 parents f022045 + 1500aee commit 2af9f7b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Loader/AttributeFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ protected function findClass(string $file): string|false
$tokens = token_get_all(file_get_contents($file));

if (1 === \count($tokens) && \T_INLINE_HTML === $tokens[0][0]) {
throw new \InvalidArgumentException(\sprintf('The file "%s" does not contain PHP code. Did you forgot to add the "<?php" start tag at the beginning of the file?', $file));
throw new \InvalidArgumentException(\sprintf('The file "%s" does not contain PHP code. Did you forget to add the "<?php" start tag at the beginning of the file?', $file));
}

$nsTokens = [\T_NS_SEPARATOR => true, \T_STRING => true];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Loader/AttributeFileLoaderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function testLoadTraitWithClassConstant()
public function testLoadFileWithoutStartTag()
{
$this->expectException(\InvalidArgumentException::class);
$this->expectExceptionMessage('Did you forgot to add the "<?php" start tag at the beginning of the file?');
$this->expectExceptionMessage('Did you forget to add the "<?php" start tag at the beginning of the file?');
$this->loader->load(__DIR__.'/../Fixtures/OtherAnnotatedClasses/NoStartTagClass.php');
}

Expand Down

0 comments on commit 2af9f7b

Please sign in to comment.