محمد میرزاخانی
1 سال پیش توسط محمد میرزاخانی مطرح شد
1 پاسخ

مشکل merge کردن در لاراول

سلام دوستان خسته نباشید ما دونفری روی یک پروژه از طریق گیت هاب کار میکنیم الان ی مشکلی پیش اومده هر کاری میکنیم رفع نمیشه و مقع ران کردن سرور به مشکل زیر میخوریم

PS D:\xampp\htdocs\VasiliBlog> php artisan serve
PHP Fatal error:  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], 
?string $domain = null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string in D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php on line 197

   Symfony\Component\ErrorHandler\Error\FatalError 

  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain 
= null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string

  at D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php:197
    193▕ 
    194▕     /**
    195▕      * {@inheritdoc}
    196▕      */
  ➜ 197▕     public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) 
    198▕     {
    199▕         if (null === $id || '' === $id) {
    200▕             return '';
    201▕         }

   Whoops\Exception\ErrorException 

  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain 
= null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string

  at D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php:197
    193▕
    194▕     /**
    195▕      * {@inheritdoc}
    196▕      */
  ➜ 197▕     public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) 
    198▕     {
    199▕         if (null === $id || '' === $id) {
    200▕             return '';
    201▕         }

  1   D:\xampp\htdocs\VasiliBlog\vendor\filp\whoops\src\Whoops\Run.php:510
      Whoops\Run::handleError("Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string", 
"D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php")

  2   [internal]:0
      Whoops\Run::handleShutdown()
PS D:\xampp\htdocs\VasiliBlog> 

دستور compose update را هم زدم و به مشکل زیر باز خوردم

Nothing to modify in lock file
Installing dependencies from lock file (including require-dev)
Nothing to install, update or remove
Deprecation Notice: Return type of Composer\Repository\CompositeRepository::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Repository/CompositeRepository.php:180
Package fruitcake/laravel-cors is abandoned, you should avoid using it. No replacement was suggested.
Package swiftmailer/swiftmailer is abandoned, you should avoid using it. Use symfony/mailer instead.
Generating optimized autoload files
Deprecation Notice: Return type of Symfony\Component\Finder\Finder::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Finder.php:675       
Deprecation Notice: Return type of Symfony\Component\Finder\Finder::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Finder.php:732
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with FilterIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/FilterIterator.php:30
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FileTypeFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/FileTypeFilterIterator.php:42
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::getChildren() should 
either be compatible with RecursiveDirectoryIterator::getChildren(): RecursiveDirectoryIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:85
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::rewind() should either be compatible with FilesystemIterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:113
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\RecursiveDirectoryIterator::current() should either be compatible with FilesystemIterator::current(): SplFileInfo|FilesystemIterator|string, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/RecursiveDirectoryIterator.php:65
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:55
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::hasChildren() should either be compatible with RecursiveIterator::hasChildren(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:71
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\ExcludeDirectoryFilterIterator::getChildren() should either be compatible with RecursiveIterator::getChildren(): ?RecursiveIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/ExcludeDirectoryFilterIterator.php:76
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FilterIterator::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/FilterIterator.php:30Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\FilenameFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/FilenameFilterIterator.php:28
Deprecation Notice: Return type of Symfony\Component\Finder\Iterator\PathFilterIterator::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/vendor/symfony/finder/Iterator/PathFilterIterator.php:27
Deprecation Notice: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/Autoload/ClassMapGenerator.php:251
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   Symfony\Component\ErrorHandler\Error\FatalError

  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain 
= null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string

  at D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php:197
    193▕
    194▕     /**
    195▕      * {@inheritdoc}
    196▕      */
  ➜ 197▕     public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) 
    198▕     {
    199▕         if (null === $id || '' === $id) {
    200▕             return '';
    201▕         }

   Whoops\Exception\ErrorException

  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain 
= null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string

  at D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php:197
    193▕
    194▕     /**
    195▕      * {@inheritdoc}
    196▕      */
  ➜ 197▕     public function trans(?string $id, array $parameters = [], string $domain = null, string $locale = null) 
    198▕     {
    199▕         if (null === $id || '' === $id) {
    200▕             return '';
    201▕         }

  1   D:\xampp\htdocs\VasiliBlog\vendor\filp\whoops\src\Whoops\Run.php:510
      Whoops\Run::handleError("Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], ?string $domain = null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string", 
"D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php")
  2   [internal]:0
      Whoops\Run::handleShutdown()
PHP Fatal error:  Declaration of Symfony\Component\Translation\Translator::trans(?string $id, array $parameters = [], 
?string $domain = null, ?string $locale = null) must be compatible with Symfony\Contracts\Translation\TranslatorInterface::trans(string $id, array $parameters = [], ?string $domain = null, ?string $locale = null): string in D:\xampp\htdocs\VasiliBlog\vendor\symfony\translation\Translator.php on line 197
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 255  

ثبت پرسش جدید
مهدی مشایخی
تخصص : برنامه نویس پایتون - ماشین لرن...
@MahdiMashayekhi 1 سال پیش مطرح شد
0

سلام
این کدی که فرستاید که خیلی طولانی هست و قابل خوندن نیست ولی احتمال میدم نسخه ای که شما دارید روش کار میکنید با همکارتون متفاوت هست و تداخل ایجاد میکنه


برای ارسال پاسخ لازم است وارد شده یا ثبت‌نام کنید

ورود یا ثبت‌نام