Symfony 4 with PHP 7.3 I get Composer update error - composer-php

I changed my Ubuntu Plesk PHP Version to 7.3.11 to update my Symfony project with composer.
I get the following Error:
- /etc/php/7.3/cli/php.ini
- /etc/php/7.3/cli/conf.d/10-opcache.ini
- /etc/php/7.3/cli/conf.d/10-pdo.ini
- /etc/php/7.3/cli/conf.d/15-xml.ini
- /etc/php/7.3/cli/conf.d/20-calendar.ini
- /etc/php/7.3/cli/conf.d/20-ctype.ini
- /etc/php/7.3/cli/conf.d/20-curl.ini
- /etc/php/7.3/cli/conf.d/20-dom.ini
- /etc/php/7.3/cli/conf.d/20-exif.ini
- /etc/php/7.3/cli/conf.d/20-fileinfo.ini
- /etc/php/7.3/cli/conf.d/20-ftp.ini
- /etc/php/7.3/cli/conf.d/20-gd.ini
- /etc/php/7.3/cli/conf.d/20-gettext.ini
- /etc/php/7.3/cli/conf.d/20-iconv.ini
- /etc/php/7.3/cli/conf.d/20-intl.ini
- /etc/php/7.3/cli/conf.d/20-json.ini
- /etc/php/7.3/cli/conf.d/20-mbstring.ini
- /etc/php/7.3/cli/conf.d/20-phar.ini
- /etc/php/7.3/cli/conf.d/20-posix.ini
- /etc/php/7.3/cli/conf.d/20-readline.ini
- /etc/php/7.3/cli/conf.d/20-shmop.ini
- /etc/php/7.3/cli/conf.d/20-simplexml.ini
- /etc/php/7.3/cli/conf.d/20-sockets.ini
- /etc/php/7.3/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.3/cli/conf.d/20-sysvsem.ini
- /etc/php/7.3/cli/conf.d/20-sysvshm.ini
- /etc/php/7.3/cli/conf.d/20-tokenizer.ini
- /etc/php/7.3/cli/conf.d/20-wddx.ini
- /etc/php/7.3/cli/conf.d/20-xmlreader.ini
- /etc/php/7.3/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.3/cli/conf.d/20-xsl.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
I tried to install:
sudo apt-get install php7.3-gd
sudo apt-get install php7.3-intl
sudo apt-get install php7.3-mbstring
Restart with:
sudo service apache2 restart
No change. In my Plesk admin, all the extensions are enabled.
But looks like not from Plesk coming. Comes from the php from server. If I run php --ini I get:
Loaded Configuration File: /etc/php/7.3/cli/php.ini
Scan for additional .ini files in: /etc/php/7.3/cli/conf.d
Additional .ini files parsed: /etc/php/7.3/cli/conf.d/10-opcache.ini,
/etc/php/7.3/cli/conf.d/10-pdo.ini,
/etc/php/7.3/cli/conf.d/15-xml.ini,
/etc/php/7.3/cli/conf.d/20-calendar.ini,
/etc/php/7.3/cli/conf.d/20-ctype.ini,
/etc/php/7.3/cli/conf.d/20-curl.ini,
/etc/php/7.3/cli/conf.d/20-dom.ini,
/etc/php/7.3/cli/conf.d/20-exif.ini,
/etc/php/7.3/cli/conf.d/20-fileinfo.ini,
/etc/php/7.3/cli/conf.d/20-ftp.ini,
/etc/php/7.3/cli/conf.d/20-gd.ini,
/etc/php/7.3/cli/conf.d/20-gettext.ini,
/etc/php/7.3/cli/conf.d/20-iconv.ini,
/etc/php/7.3/cli/conf.d/20-intl.ini,
/etc/php/7.3/cli/conf.d/20-json.ini,
/etc/php/7.3/cli/conf.d/20-mbstring.ini,
/etc/php/7.3/cli/conf.d/20-phar.ini,
/etc/php/7.3/cli/conf.d/20-posix.ini,
/etc/php/7.3/cli/conf.d/20-readline.ini,
/etc/php/7.3/cli/conf.d/20-shmop.ini,
/etc/php/7.3/cli/conf.d/20-simplexml.ini,
/etc/php/7.3/cli/conf.d/20-sockets.ini,
/etc/php/7.3/cli/conf.d/20-sysvmsg.ini,
/etc/php/7.3/cli/conf.d/20-sysvsem.ini,
/etc/php/7.3/cli/conf.d/20-sysvshm.ini,
/etc/php/7.3/cli/conf.d/20-tokenizer.ini,
/etc/php/7.3/cli/conf.d/20-wddx.ini,
/etc/php/7.3/cli/conf.d/20-xmlreader.ini,
/etc/php/7.3/cli/conf.d/20-xmlwriter.ini,
/etc/php/7.3/cli/conf.d/20-xsl.ini
Any idea?

The extension -zip was missing

Related

compose update not working if using php8 (xxx in the lock file but not in remote repositories ,...)

I've a composer project (magento 2, upgraded from php7 to php 8), if now i use php 8 (inside docker) run "composer udpate", it will shows
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires mobiledetect/mobiledetectlib 2.8.39, found mobiledetect/mobiledetectlib[2.8.39] in the lock file but not in remote repositories, mak e sure you avoid updating this package to keep the one from the lock file.
Problem 2
- Root composer.json requires magento/composer-root-update-plugin 2.0.2 -> satisfiable by magento/composer-root-update-plugin[2.0.2].
- magento/composer-root-update-plugin 2.0.2 requires composer/composer ^1.0 || ^2.0 -> found composer/composer[2.2.18] in the lock file but not in remote reposito ries, make sure you avoid updating this package to keep the one from the lock file.
Problem 3
- Root composer.json requires magento/ece-tools ^2002.1.11 -> satisfiable by magento/ece-tools[2002.1.11, 2002.1.12].
- magento/ece-tools[2002.1.11, ..., 2002.1.12] require colinmollenhour/credis ^1.6.0 -> found colinmollenhour/credis[v1.13.0] in the lock file but not in remote r epositories, make sure you avoid updating this package to keep the one from the lock file.
Problem 4
- Root composer.json requires magento/magento-cloud-metapackage >=2.4.5 <2.4.6 -> satisfiable by magento/magento-cloud-metapackage[2.4.5].
- magento/magento-cloud-metapackage 2.4.5 requires fastly/magento2 ^1.2.34 -> found fastly/magento2[1.2.187] in the lock file but not in remote repositories, make sure you avoid updating this package to keep the one from the lock file.
But it will work fine in php7.4(inside docker), do anyone know what's the problem?
More info:
docker info
php72:
container_name: web_php
image: webmaketech/php74
build: ./php72
volumes:
- ./src:/var/www
- ./php72/php.ini:/usr/local/etc/php/php.ini
- ./php72/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
php810:
container_name: web_php_810
image: webmaketech/php810
build: ./php810
volumes:
- ./src:/var/www
- ./php810/php.ini:/usr/local/etc/php/php.ini
- ./php810/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
You can ignore platform requirements. run the below command.
composer udpate --ignore-platform-reqs
searched 2 days on internet, finally got solution
composer config -g repo.packagist composer https://mirrors.aliyun.com/composer
after run this command, i can process now

Error: Cannot find module 'graphql/validation/rules/KnownArgumentNamesRule'

When I run the command apollo client:codegen the following error comes up :
Error: Cannot find module 'graphql/validation/rules/KnownArgumentNamesRule'
Require stack:
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\composition\validate\preNormalization\tagDirective.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\composition\validate\preNormalization\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\composition\validate\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\composition\composeAndValidate.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\composition\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#apo
llo\federation\dist\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\apol
lo-language-server\lib\providers\schema\file.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\apol
lo-language-server\lib\providers\schema\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\apol
lo-language-server\lib\project\base.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\apol
lo-language-server\lib\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\lib\commands\clie
nt\codegen.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#ocl
if\config\lib\plugin.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#ocl
if\config\lib\config.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#ocl
if\config\lib\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#ocl
if\command\lib\command.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\node_modules\#ocl
if\command\lib\index.js
- C:\Users\Minseo\AppData\Roaming\npm\node_modules\apollo\bin\run
Code: MODULE_NOT_FOUND
Downgrading does not help. But installing graphql globally seem to solve the issue.
npm install -g graphql
This is a known issue with apollo. I followed the suggestion to downgrade to node v14.17.5, and everything worked.
You only have to install apollo(yarn add apollo) and fix the problem
Very annoying issue, I installed graphql and apollo globally using node v 14. At the end this worked for me: https://github.com/apollographql/apollo-tooling/issues/2415#issuecomment-930173053
Now it works with node v 16 and w/o post install. 🤷‍♂️
Just install appolo into your dev dependencies, e.g yarn add -D apollo and use it like ./node_modules/.bin/apollo client:codegen
I've tried on a windows PC instead of mac with following versions
apollo/2.34.0 win32-x64 node-v10.15.3
That worked for me

How do I properly create buildspec.yml file for Laravel Application using AWS CodePipeline

I am using AWS CodePipeline for the first time and trying to figure out how to properly create my buildspec.yml file for my Laravel application. There are few resources on the internet.
I have the following in my buildspec.yml file currently:
version: 0.2
phases:
install:
commands:
- curl -s https://getcomposer.org/installer | php
- mv composer.phar /usr/local/bin/composer
- php --version
build:
commands:
- echo Build started on `date`
- echo Installing composer deps
- composer install
- cp extra/.env ./
- php artisan cache:clear
post_build:
commands:
- echo Build completed on `date`
artifacts:
type: zip
files:
- '**/*'
name: clyde-$(date +%Y-%m-%d)
The CodeBuild is successful and this does deploy to Elastic Beanstalk. I did change the configuration in Elastic Beanstalk so the root is /public (for Laravel). However, when I go to the URL, the first line of code run presents an error like below:
View [inc\navbar] not found. (View: /var/app/current/resources/views/layouts/app.blade.php)
This leads me to believe something is not built properly.
To make it work, it will need to use a complete Pipeline: CodeCommit-->CodeBuild-->CodeDeploy
Inside your Artifact bucket there will be two objects generated in the process:
s3://codepipeline-us-east-1-<001122334455>/SourceArtif/
s3://codepipeline-us-east-1-<001122334455>/BuildArtif/
The first one is obtained in the initial phase of the pipeline from CodeCommit.
The second one is created by CodeBuild. The resultant zip file will be exactly the same as that one from CodeCommit. So it seems, the CodeBuild is only testing but not saving the Artifact with results from the instructions specified in buildspec.yml.
The third phase, CodeDeploy will obtain the code from the Artifact and it will need to Build again via scripts referred by appspec.yml.
version: 0.0
os: linux
files:
- source: /
destination: /web/project/html
hooks:
BeforeInstall:
- location: scripts/install_dependencies.sh
timeout: 300
runas: root
AfterInstall:
- location: scripts/build_again.sh
timeout: 600
runas: user
ApplicationStart:
- location: scripts/start_application.sh
timeout: 300
runas: root
The build_again.sh file will need to include same commands you are using in buildspec.yml (build section), then your Laravel project should be working.

Laravel composer install error

Hi I create server on Centos 7. i am used php 7 and Httpd server. But when i running composer install am i getting this error. any idea?
To enable extensions, verify that they are enabled in your .ini files:
- /etc/php.ini
- /etc/php.d/20-bz2.ini
- /etc/php.d/20-calendar.ini
- /etc/php.d/20-ctype.ini
- /etc/php.d/20-curl.ini
- /etc/php.d/20-dom.ini
- /etc/php.d/20-exif.ini
- /etc/php.d/20-fileinfo.ini
- /etc/php.d/20-ftp.ini
- /etc/php.d/20-gettext.ini
- /etc/php.d/20-iconv.ini
- /etc/php.d/20-json.ini
- /etc/php.d/20-mysqlnd.ini
- /etc/php.d/20-pdo.ini
- /etc/php.d/20-phar.ini
- /etc/php.d/20-simplexml.ini
- /etc/php.d/20-sockets.ini
- /etc/php.d/20-sqlite3.ini
- /etc/php.d/20-tokenizer.ini
- /etc/php.d/20-xml.ini
- /etc/php.d/20-xmlwriter.ini
- /etc/php.d/20-xsl.ini
- /etc/php.d/20-zip.ini
- /etc/php.d/30-mysqli.ini
- /etc/php.d/30-pdo_mysql.ini
- /etc/php.d/30-pdo_sqlite.ini
- /etc/php.d/30-wddx.ini
- /etc/php.d/30-xmlreader.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.
Try to install all laravel php requirements first.
You have to install this requirements exactly to php7.
https://laravel.com/docs/5.4/installation

Aurelia, installation issue with webpack

I wanted to try Aurelia today but I have an issue with the webpack skeleton.
So, I have downloaded the webpack skeleton on the official website, and I started the npm install and start script.
But when I browse to http://localhost:9000/ I have a lot of errors.
Html Webpack Plugin:
TypeError: Cannot read property 'request' of undefined
- ExternalModuleFactoryPlugin.js:37 handleExternals
[aurelia]/[config-generate-index-html]/[webpack]/lib/ExternalModuleFactoryPl ugin.js:37:33
- ExternalModuleFactoryPlugin.js:46 next
[aurelia]/[config-generate-index-html]/[webpack]/lib/ExternalModuleFactoryPl ugin.js:46:8
- ExternalModuleFactoryPlugin.js:59 handleExternals
[aurelia]/[config-generate-index-html]/[webpack]/lib/ExternalModuleFactoryPl ugin.js:59:7
- ExternalModuleFactoryPlugin.js:79 ExternalModuleFactoryPlugin.
[aurelia]/[config-generate-index-html]/[webpack]/lib/ExternalModuleFactoryPl ugin.js:79:5
- NormalModuleFactory.js:177
[aurelia]/[webpack]/lib/NormalModuleFactory.js:177:3
- Tapable.js:123 NormalModuleFactory.applyPluginsAsyncWaterfall
[aurelia]/[webpack]/[tapable]/lib/Tapable.js:123:70
- NormalModuleFactory.js:161 NormalModuleFactory.create
[aurelia]/[webpack]/lib/NormalModuleFactory.js:161:8
- Compilation.js:356 Compilation.process [as _addModuleChain]
[aurelia]/[webpack]/lib/Compilation.js:356:16
- Compilation.js:427 Compilation.process [as addEntry]
[aurelia]/[webpack]/lib/Compilation.js:427:7
- SingleEntryPlugin.js:22 SingleEntryPlugin.
[aurelia]/[config-generate-index-html]/[webpack]/lib/SingleEntryPlugin.js:22 :15
- Tapable.js:156 Compiler.applyPluginsParallel
[aurelia]/[webpack]/[tapable]/lib/Tapable.js:156:14
- Compiler.js:431 Compiler.compile
[aurelia]/[webpack]/lib/Compiler.js:431:7
- Compiler.js:237 Compiler.runAsChild
[aurelia]/[webpack]/lib/Compiler.js:237:7
- compiler.js:70
[aurelia]/[config-generate-index-html]/[html-webpack-plugin]/lib/compiler.js :70:19
- compiler.js:69 Object.compileTemplate
[aurelia]/[config-generate-index-html]/[html-webpack-plugin]/lib/compiler.js :69:10
- index.js:47 Compiler.
[aurelia]/[config-generate-index-html]/[html-webpack-plugin]/index.js:47:40
- Tapable.js:156 Compiler.applyPluginsParallel
[aurelia]/[webpack]/[tapable]/lib/Tapable.js:156:14
- Compiler.js:431 Compiler.compile
[aurelia]/[webpack]/lib/Compiler.js:431:7
- Compiler.js:47 Watching.
[aurelia]/[webpack]/lib/Compiler.js:47:17
I use 2.15.9 npm version and 4.5.0 node version.
Your npm version must be 3 or greater. Update npm using npm install npm -g then install the packages again.

Resources