Adding league s3 filesystem breaks auto loading - php

After adding the Leauge S3 filesystem adaptor I receive the following auto loading error on my EBS system.
composer.json
"require": {
"php": ">=5.5.0",
"slim/slim": "2.3.2",
"slim/extras": "dev-develop",
"twig/twig": "1.*",
"directus/migrations": "dev-master",
"directus/permissions": "0.9.*#dev",
"directus/database": "~0.1.3",
"league/flysystem": "^1.0",
"league/flysystem-aws-s3-v3": "^1.0",
"swiftmailer/swiftmailer": "^5.4" },
Error:
Failed opening required
'/var/app/current/vendor/composer/../guzzlehttp/psr7/src/functions_include.php'
(include_path='/var/app/current/vendor/phpunit/php-token-stream:/var/app/current/vendor/phpunit/phpunit-mock-objects:/var/app/current/vendor/phpunit/php-code-coverage:/var/app/current/vendor/phpunit/phpunit:/var/app/current/vendor/symfony/yaml:.:/usr/share/pear7:/usr/share/php7')
in /var/app/current/vendor/composer/autoload_real.php on line 70

try updating composer with
>composer self-update
You can also clear the cache of composer launching the command:
>composer clear-cache
Hope this help

Related

Class '\Omnipay\YooKassa\Gateway' not found

i have added LIB yookassa to laravel/vendor/omnipay/yookassa, but after call
$gateway = Omnipay::create('YooKassa');
it was error Class '\Omnipay\YooKassa\Gateway' not found
The main composer.json (require section)
"omnipay/paypal": "*",
"omnipay/stripe": "*",
"omnipay/yookassa": "*",
"yoomoney/yookassa-sdk-php": "^2.4",
"hiqdev/omnipay-yandex-kassa": "^3.0",
"igor-tv/omnipay-yookassa": "^4.0",
Try first clear the cache
php artisan optimize:clear
after you need
composer install

Composer won't install due to strange syntax in composer.json: "package/package": "other-package as x.xx.x"

This composer.json file won't install due to an inline alias. This line appears to be the culprit:
"jms/serializer": "xsd2php-dev as 0.18.0",
I'm not sure what this is trying to do. Is it trying to replace the jms/serializer with xsd2php-dev at version 0.18.0?
Here is the full file:
{
"require": {
"jsanc623/phpbenchtime": "dev-master",
"gte451f/phalcon-json-api-package": "dev-master",
"soundasleep/html2text": "~0.2",
"phpmailer/phpmailer": "~5.2",
"php": ">=5.2.0",
"ext-curl": "*",
"jms/serializer": "xsd2php-dev as 0.18.0",
"robmorgan/phinx": "^0.5.3",
"aws/aws-sdk-php": "^3.19"
},
"require-dev": {
"codeception/codeception": "*",
"flow/jsonpath": "dev-master",
"goetas/xsd2php": "2.*#dev",
"goetas/xsd-reader": "2.*#dev"
},
"repositories": [{
"type": "vcs",
"url": "https://github.com/goetas/serializer.git"
}]
}
Composer version 1.10.19
here is an example of my error I get:
$ composer
[UnexpectedValueException]
Invalid version string "xsd2php-dev" in "xsd2php-dev as 0.18.0", the alias source must be an exact version, if it is a branch name you should prefix it with dev-
As per #rob006:
Try change it to dev-xsd2php as 0.18.0 - non-version-like branches should be prefixed by dev, not suffixed.
"jms/serializer": "xsd2php-dev as 0.18.0",
to
"jms/serializer": "dev-xsd2php as 0.18.0",

Laravel 5 - Custom Package "Class Not Found" When Pushed to Heroku

I'm having a bit of trouble getting a custom package to work when deploying my Laravel app to Heroku. It works fine locally, but when pushed I get the following error:
In ProviderRepository.php line 208: Class 'totalWebConnections\simpleBlog\simpleBlogServiceProvider' not found
It looks like the server is correctly loading the package from my composer file, just above the error in the log:
Installing totalwebconnections/simple-blog (1.0.0)
In my composer.json
"require": {
"php": ">=5.6.4",
"laravel/framework": "5.4.*",
"laravel/tinker": "~1.0",
"totalwebconnections/simple-blog": "1.0.0"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~5.0"
},
"autoload": {
"classmap": [
"database"
],
"psr-4": {
"App\\": "app/",
"totalWebConnections\\simpleBlog\\": "vendor/totalWebConnections/simple-blog/src/"
}
},
And then in my app.php
totalWebConnections\simpleBlog\simpleBlogServiceProvider::class,
I'm not sure what the issue is?
I think you should double check your namespaces and case of file names - when you deploy on Windows for example it doesn't care whether it's simpleBlog or SimpleBog but when deployed to Linux server it won't work if it's not 100% same as it should be.

How to work on a fork in GitHub

I would like to update a repo in GitHub to make it compatible with ZF3, I have forked the repository to my account and made some updates.
This is my fork: https://github.com/chateaux/zf-oauth2-doctrine
Now to include this in my code base I am using Composer:
{
"name": "My Project",
"description": "",
"license": "PRIVATE - ",
"keywords": [
""
],
"homepage": "",
"repositories": [
{
"type": "vcs",
"url": "https://github.com/chateaux/zf-oauth2-doctrine"
}
],
"require": {
"php": ">=5.4",
"zendframework/zendframework": "^2.4",
"doctrine/doctrine-orm-module": "~0.8",
"doctrine/orm": "^2.4",
"gedmo/doctrine-extensions": "^2.4",
"zf-commons/zfc-rbac":"^2.5",
"rwoverdijk/assetmanager": "^1.4",
"zfcampus/zf-apigility": "^1.0",
"zfr/zfr-cors": "^1.2",
"hounddog/doctrine-data-fixture-module": "^0.0.4",
"zfcampus/zf-oauth2-client": "dev-master",
"api-skeletons/zf-oauth2-doctrine": "dev-master",
"api-skeletons/zf-oauth2-doctrine-console": "^1.1",
"chateaux/toolbox" : "dev-master"
},
"require-dev": {
"zfcampus/zf-apigility-admin": "~1.0",
"zfcampus/zf-development-mode": "~2.0",
"zendframework/zend-developer-tools": "dev-master"
}
}
However when I run a composer update, it appears to be pulling from a cache so I am not getting my updated code base:
$ php composer.phar update
You are running composer with xdebug enabled. This has a major impact on runtime performance. See https://getcomposer.org/xdebug
Warning: This development build of composer is over 60 days old. It is recommended to update it by running "composer.phar self-update" to get the latest version.
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Installing zfcampus/zf-oauth2-doctrine (1.0.3)
Loading from cache
What am I doing wrong?
You should add your custom fork of the repository to the repositories array in your composer.json file and add a type field git and then point to the branch you want to use with dev-[branchname] (for example patch-4 becomes dev-patch4):
{
"name": "My ZF2 application",
"repositories": [
{
"type": "git",
"url": "https://github.com/chateaux/zf-oauth2-doctrine.git"
},
],
"require": {
...
"zfcampus/zf-oauth2-doctrine": "dev-patch-4",
...
}
}
Make sure that patch-4 is an existing branch in your custom repository.
You can find more information on this solution on the first hit from Google.

Behat can't find PhpExecutableFinder

I get the following error when executing Behat:
PHP Fatal error: Class 'Symfony\Component\Process\PhpExecutableFinder' not found
I don't know if its normal, but the PhpExecutableFinder is located within my composer.phar after php composer.phar update is called.
{
"require": {
"php": ">=5.4",
"ext-mcrypt": "*",
"slim/slim": "~2.0",
"slim/views": "0.1.*",
"twig/twig": "1.18.*",
"propel/propel": "~2.0#dev",
"zeflasher/propel2-geocodable-behavior": "dev-master",
"behat/behat": "3.0.*#stable",
"behat/mink": "1.6.*#stable",
"behat/mink-extension": "#stable",
"behat/mink-goutte-driver": "#stable",
"behat/mink-selenium2-driver": "#stable",
"peridot-php/leo": "~1.0"
},
"autoload": {
"classmap": ["website/", "vendor/"]
}
}
Is my current composer.json. Can anybody reproduce it? composer.phar is self-updated.
composer require symfony/process
That solved the issue. I don't know why its not included in behat.

Categories