пятница, 15 февраля 2019 г.

[gitlab] multiline environment variable passed as empty line fix

Use correct way to pass variable in your .gitlab-ci.yml in `script` section:
- echo "$PROD_PRIVATE_KEY" > config/nginx/certs/site.dev.priv

Then be sure you disabled "protected" option for your variable in Gitlab Settings > CI / CD.

воскресенье, 10 февраля 2019 г.

How to fix "phpcr/phpcr-implementation no matching package found"

If you have error:

Using version ^1.4 for doctrine/phpcr-odm
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Restricting packages listed in "symfony/symfony" to "4.2.*"
Your requirements could not be resolved to an installable set of packages.

 Problem 1
   - doctrine/phpcr-odm 1.4.4 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
   - doctrine/phpcr-odm 1.4.3 requires phpcr/phpcr-implementation ^2.1 -> no matching package found.
   - doctrine/phpcr-odm 1.4.2 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - doctrine/phpcr-odm 1.4.1 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - doctrine/phpcr-odm 1.4.0 requires phpcr/phpcr-implementation ^2.1.0 -> no matching package found.
   - Installation request for doctrine/phpcr-odm ^1.4 -> satisfiable by doctrine/phpcr-odm[1.4.0, 1.4.1, 1.4.2, 1.4.
3, 1.4.4].

Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability setting
  see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
- It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.


You should add your project's composer.json these lines:
"provide": {
    "phpcr/phpcr-implementation": "2.1.0"},

Symfony 4.2.3.