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

PHP 8.1 exception with illuminate/support 5.4.36 #23

Open
ossigeno opened this issue Jan 6, 2022 · 0 comments
Open

PHP 8.1 exception with illuminate/support 5.4.36 #23

ossigeno opened this issue Jan 6, 2022 · 0 comments

Comments

@ossigeno
Copy link

ossigeno commented Jan 6, 2022

The badWords() function throws an exception in PHP 8.1

public function badWords()
    {
       // exception thrown here:
       return collect($this->dictionary)->filter(function ($value) {
          
        })->toArray();
    }

ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice

I tried to update illuminate/contracts and illuminate/support to v 8.78 but get this issue:

Problem 1
- illuminate/support v5.4.36 requires illuminate/contracts 5.4.* -> found illuminate/contracts[v5.4.0, ..., 5.4.x-dev] but it conflicts with your root composer.json require (^8.78).
- consoletvs/profanity 3.1.0 requires illuminate/support 5.4.|5.5.|5.6.|5.7.|5.8.|6.|7.|8. -> satisfiable by illuminate/support[v5.4.36].
- consoletvs/profanity is locked to version 3.1.0 and an update of this package was not requested.

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

1 participant