Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Script cache:clear returned with error code 255 when i try to create a project #1

Open
celtic34fr opened this issue Apr 21, 2023 · 3 comments

Comments

@celtic34fr
Copy link

Hello,

when i want to create a project with :
'composer create-project metabolism/wordpress-skeleton ...'

I've got at the end this error :
Executing script cache:clear [KO] [KO] Script cache:clear returned with error code 255 !! PHP Fatal error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /develops/Tests/sandbox/php/Dumez/wbs/vendor/symfony/string/Slugger/AsciiSlugger.php on line 93 !! Symfony\Component\ErrorHandler\Error\FatalError {#4884 !! #message: "Compile Error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" !! #code: 0 !! #file: "./vendor/symfony/string/Slugger/AsciiSlugger.php" !! #line: 93 !! -error: array:4 [ !! "type" => 64 !! "message" => "Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" !! "file" => "/develops/Tests/sandbox/php/Dumez/wbs/vendor/symfony/string/Slugger/AsciiSlugger.php" !! "line" => 93 !! ] !! } !! Script @auto-scripts was called via post-update-cmd

after creating and modify .env.local file, i run the command
symfony console d:d:c
I've got this error :
PHP Fatal error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /develops/Tests/sandbox/php/Dumez/wbs/vendor/symfony/string/Slugger/AsciiSlugger.php on line 93 Symfony\Component\ErrorHandler\Error\FatalError^ {#4879 #message: "Compile Error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" #code: 0 #file: "./vendor/symfony/string/Slugger/AsciiSlugger.php" #line: 93 -error: array:4 [ "type" => 64 "message" => "Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" "file" => "/develops/Tests/sandbox/php/Dumez/wbs/vendor/symfony/string/Slugger/AsciiSlugger.php" "line" => 93 ] }
And the database wasn't creates.

I try to run internal web server with 'symfony serve -d'. I've got the same error :
`Symfony Exception
Symfony Docs
FatalError
HTTP 500 Internal Server Error
Compile Error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string

Exception Stack Trace 

Symfony\Component\ErrorHandler\Error\ FatalError`

I can't access to the administration area bexause the database wasn't created.

after creating database manualy, and try to access to the admin area, i've got the Wordpress installation screen with nthis error notice at the top of the language form :
WordPress database error: [Table 'wbs.wp_options' doesn't exist] SHOW FULL COLUMNS FROM wp_options`
And even, on the top of each page of the installation process.

But when I try to connect to the administration area, I've got the error :
`FatalError
HTTP 500 Internal Server Error
Compile Error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string

Exception Stack Trace 

Symfony\Component\ErrorHandler\Error\ FatalError
in /develops/Tests/sandbox/php/Dumez/wbs/vendor/symfony/string/Slugger/AsciiSlugger.php (line 93)`

I can't use anyway this installation.

Gilbert ARMENGAUD
Celtic34fr
Béziers - Occitanie - France

@jerome-barbato
Copy link
Member

jerome-barbato commented May 2, 2023

Hello @celtic34fr I'm sorry to hear that you have issues creating a project.
What's your version of PHP ? Are you on WSL ? Could you attach your composer.lock ?

@celtic34fr
Copy link
Author

i'm working with Php 8.1 on Ubuntu platform (nginx, mariadb, php)
with_wordpressbundle_1.5.composer.lock.txt
with with_wordpressbundle_1.5.composer.lock.txt, the clear command get this result:
`In class.km.autoupdate.v3.php line 78:

Warning: Undefined array key "SERVER_NAME"

2023-05-02T09:17:14+00:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
2023-05-02T09:17:14+00:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\HeaderBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
2023-05-02T09:17:14+00:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
2023-05-02T09:17:14+00:00 [info] Deprecated: Return type of Symfony\Component\HttpFoundation\ParameterBag::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice
`

with_wordpressbundle_2.0.composer.lock.txt
with with_wordpressbundle_2.0.composer.lock.txt, the clear command get this result:
PHP Fatal error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string in /develops/Tests/sandbox/php/Dumez/wbs.2.0.x/vendor/symfony/string/Slugger/AsciiSlugger.php on line 93 Symfony\Component\ErrorHandler\Error\FatalError^ {#4884 #message: "Compile Error: Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" #code: 0 #file: "./vendor/symfony/string/Slugger/AsciiSlugger.php" #line: 93 -error: array:4 [ "type" => 64 "message" => "Declaration of Symfony\Component\String\Slugger\AsciiSlugger::getLocale() must be compatible with Symfony\Contracts\Translation\LocaleAwareInterface::getLocale(): string" "file" => "/develops/Tests/sandbox/php/Dumez/wbs.2.0.x/vendor/symfony/string/Slugger/AsciiSlugger.php" "line" => 93 ] }

@jerome-barbato
Copy link
Member

jerome-barbato commented May 2, 2023

Ok I got it, I have released a new version of the skeleton using stable vendors version.
Let me know @celtic34fr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants