laborb / statamic-notifications-channel

Statamic addon for notifications on statamic events
4 stars 0 forks source link

Cannot install 1.1 version on Laravel 11 #1

Closed RihardsZ closed 3 months ago

RihardsZ commented 3 months ago

Expected Behavior

sail composer require -W laborb/statamic-notifications-channel:^1.1 installs the latest version of laborb/statamic-notifications-channel (1.1.0 at the moment of writing)

Actual Behavior

composer require fails with the message 'requirements cannot be resolved'

Setup

PHP 8.3 Laravel 11

Details

sail composer require -W laborb/statamic-notifications-channel:^1.1
./composer.json has been updated
Running composer update laborb/statamic-notifications-channel --with-all-dependencies
> Statamic\Console\Composer\Scripts::preUpdateCmd
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - illuminate/console[v10.0.0, ..., v10.48.16] require nunomaduro/termwind ^1.13 -> found nunomaduro/termwind[v1.13.0, ..., v1.15.1] but these were not loaded, likely because it conflicts with another require.
    - illuminate/notifications[v5.8.0, ..., v5.8.36] require php ^7.1.3 -> your php version (8.3.9) does not satisfy that requirement.
    - illuminate/notifications[v6.0.0, ..., v6.19.1] require php ^7.2 -> your php version (8.3.9) does not satisfy that requirement.
    - illuminate/notifications[v6.20.0, ..., v6.20.44] require illuminate/contracts ^6.0 -> found illuminate/contracts[v6.0.0, ..., v6.20.44] but these were not loaded, likely because it conflicts with another require.
    - illuminate/notifications[v7.0.0, ..., v7.28.4] require php ^7.2.5 -> your php version (8.3.9) does not satisfy that requirement.
    - illuminate/notifications[v7.29.0, ..., v7.30.6] require illuminate/contracts ^7.0 -> found illuminate/contracts[v7.0.0, ..., v7.30.6] but these were not loaded, likely because it conflicts with another require.
    - illuminate/notifications[v8.0.0, ..., v8.11.2] require php ^7.3 -> your php version (8.3.9) does not satisfy that requirement.
    - illuminate/notifications[v8.12.0, ..., v8.83.27] require illuminate/contracts ^8.0 -> found illuminate/contracts[v8.0.0, ..., v8.83.27] but these were not loaded, likely because it conflicts with another require.
    - illuminate/notifications[v9.0.0, ..., v9.52.16] require illuminate/contracts ^9.0 -> found illuminate/contracts[v9.0.0, ..., v9.52.16] but these were not loaded, likely because it conflicts with another require.
    - laravel/slack-notification-channel v2.5.0 requires illuminate/notifications ~5.8.0|^6.0|^7.0|^8.0|^9.0|^10.0 -> satisfiable by illuminate/notifications[v5.8.0, ..., v5.8.36, v6.0.0, ..., v6.20.44, v7.0.0, ..., v7.30.6, v8.0.0, ..., v8.83.27, v9.0.0, ..., v9.52.16, v10.0.0, ..., v10.48.16].
    - illuminate/notifications[v10.0.0, ..., v10.48.16] require illuminate/queue ^10.0 -> satisfiable by illuminate/queue[v10.0.0, ..., v10.48.16].
    - laborb/statamic-notifications-channel 1.1.0 requires laravel/slack-notification-channel ^2.5 -> satisfiable by laravel/slack-notification-channel[v2.5.0].
    - illuminate/queue[v10.0.0, ..., v10.48.16] require illuminate/console ^10.0 -> satisfiable by illuminate/console[v10.0.0, ..., v10.48.16].
    - Root composer.json requires laborb/statamic-notifications-channel ^1.1 -> satisfiable by laborb/statamic-notifications-channel[1.1.0].

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

Consequences

Highest version which can be installed on Laravel 11 is 1.0.3, but it is not sending out the actual notifications (as far as I understand, this is why https://github.com/laborb/statamic-notifications-channel/commit/7bf50d1e08e18f1a4a5b09d9db203b1a087d97ed#diff-124e612b864c01e038f6cf4c456a07d8d5b963c762c551780849e5d44eb3d010L24 was needed).

Possible solutions

It seems to me that laravel/slack-notification-channel requirement needs to be updated to ^v3

laborb-jf commented 3 months ago

Thanks for your report.

Possible solutions

It seems to me that laravel/slack-notification-channel requirement needs to be updated to ^v3

This was indeed necessary. I updated the dependencies in 34ee1f5

You can now install the addon with Laravel 11 and the notifications work as expected.