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

WIP: First Laravel 11 working version #75

Closed
wants to merge 2 commits into from

Conversation

lubikx
Copy link

@lubikx lubikx commented Dec 27, 2024

Support for Laravel 11
Dropped support of Laravel 4/5
Support for API key and bearer token .env definition
Current PHP Unit test cases without deprecation warnings

TODO:

  • logs from config (currently just unset)
  • cache from config (currently just unset)

@lubikx lubikx marked this pull request as draft December 27, 2024 15:15
@lubikx lubikx mentioned this pull request Dec 27, 2024
Copy link
Member

@wtfzdotnet wtfzdotnet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks first of all, I've read your e-mail, here is some feedback for starters. As suggested this obviously would be a new major version.

@@ -2,3 +2,4 @@
composer.phar
composer.lock
.DS_Store
/.phpunit.result.cache
Copy link
Member

@wtfzdotnet wtfzdotnet Dec 27, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the .idea folder as an ignore for the project, doesn't make sense to commit these files as we would via "with a team" perspective https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore

},
"config": {
"allow-plugins": {
"kylekatarnls/update-helper": true,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't seen this package before, interesting.

$this->laravelDispatcher->fire($eventName, $event);
return $this->symfonyDispatcher->dispatch($eventName, $event);
if ($eventName !== null) {
// TODO: Someone who understands events under the hood more should look into this
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you need to know?

Within https://github.com/php-tmdb/api/blob/4.1/lib/Tmdb/Event/Listener/RequestListener.php#L70 the request / response handling is done. Most of the other listeners are more "helpers" to add information to the request, or divert the response to a cached instance.

See how this is configured in symfony;

use Tmdb\Laravel\TmdbServiceProviderLaravel4;
use Tmdb\Laravel\TmdbServiceProviderLaravel5;
use Tmdb\ApiToken;
use Tmdb\Laravel\TmdbServiceProviderLaravel;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These versions don't make any sense any more at all?

$ed->addListener(BeforeRequestEvent::class, $jsonContentTypeListener);

$userAgentListener = new UserAgentRequestListener();
$ed->addListener(BeforeRequestEvent::class, $userAgentListener);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might wanna also add the other listeners here via configuration, it's optional though.

- 7.1
- 8.2
- 8.3
- 8.4
- nightly
- hhvm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think hhvm is dead by now?

@wtfzdotnet wtfzdotnet self-assigned this Dec 27, 2024
@lubikx lubikx closed this Feb 6, 2025
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

Successfully merging this pull request may close these issues.

2 participants