Open phenomenia opened 6 months ago
Same issue
Hi
Apologies for late reply. I was not available. It seems like there is a version conflict. Please make sure that you are using Laravel 9. Upgrading Electrik for L10 didn't work and broke a lot of things. If you are using L11, then try installing the dev version ( 3.x-dev ). It should work.
I am currently working on 3.x branch and will release a version soon.
Hello @neerajsohal ! I have tried electrik 3.x-dev with L11 but composer returns an error:
Problem 1
- Root composer.json requires electrik/electrik 3.x -> satisfiable by electrik/electrik[3.x-dev].
- electrik/electrik 3.x-dev requires mpociot/teamwork dev-l11-compatibility as 8.1.0 -> found mpociot/teamwork[dev-master, dev-develop, 0.7.0, 1.0.0, ..., 1.2.1, 2.0.0, 2.0.1, 3.0.0, ..., 3.5.0, 4.0.0, ..., 4.1.0, 5.0.0, 5.1.0, 5.2.0, 5.3.0, 6.0.0, ..., 6.1.2, 7.0.0, 8.0.0, 8.1.0] but it does not match the constraint.
It seems that mpociot/teamwork dev-l11-compatibility branch does not exist, any temporary solution or way to install it? Thank you!
I see. Apologies for this confusion. The @mpociot/teamwork
has not released a L11 package yet. So I am using a forked version. Same is with Laravel Shift. Please use the following steps:
"repositories": [
{
"type": "path",
"url": "/Users/neerajsohal/lab/electrik/electrik",
"options": {
"symlink": true
}
},
{
"type": "vcs",
"url": "https://github.com/laravel-shift/teamwork.git"
}
],
Thank you for pointing this out. I will add it to the project README as well.
I hope this helps.
Cheers!
For everyone's reference, below is the composer.json from one of the latest Laravel 11 with Electrik project that we are working on:
please ignore the below and refer to next one
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"electrik/electrik": "3.x-dev",
"laravel/framework": "^11.0",
"laravel/socialite": "^5.14",
"laravel/tinker": "^2.9",
"shopify/shopify-api": "^5.5",
"socialiteproviders/shopify": "^4.1"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1",
"spatie/laravel-ignition": "^2.4"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"repositories": [
{
"type": "path",
"url": "/Users/neerajsohal/lab/electrik/electrik",
"options": {
"symlink": true
}
},
{
"type": "vcs",
"url": "https://github.com/laravel-shift/teamwork.git"
}
],
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
please refer to the below
updated composer.json:
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"electrik/electrik":"3.x-dev"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
Getting error
"The url
supplied for the path (/Users/neerajsohal/lab/electrik/electrik) repository does not exist"
Getting error "The
url
supplied for the path (/Users/neerajsohal/lab/electrik/electrik) repository does not exist"
Hi,
Thank you for bringing this too notice. Teamwork has released their latest version. I have updated the compooser.json to reflect this. Below is how it should look:
{
"name": "laravel/laravel",
"type": "project",
"description": "The skeleton application for the Laravel framework.",
"keywords": ["laravel", "framework"],
"license": "MIT",
"require": {
"php": "^8.2",
"laravel/framework": "^11.9",
"laravel/tinker": "^2.9",
"electrik/electrik":"3.x-dev"
},
"require-dev": {
"fakerphp/faker": "^1.23",
"laravel/pint": "^1.13",
"laravel/sail": "^1.26",
"mockery/mockery": "^1.6",
"nunomaduro/collision": "^8.0",
"phpunit/phpunit": "^11.0.1"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-update-cmd": [
"@php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi",
"@php -r \"file_exists('database/database.sqlite') || touch('database/database.sqlite');\"",
"@php artisan migrate --graceful --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
In step 2 of the setup process I get the following error:
Your requirements could not be resolved to an installable set of packages.
Problem 1
You can also try re-running composer require with an explicit version constraint, e.g. "composer require electrik/electrik:*" to figure out if any version is installable, or "composer require electrik/electrik:^2.1" if you know which you need.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
Any idea how to solve this?