I work with symfony-standard 2.1
my composer.json file:
{
"name": "xxx",
"description": "xxx",
"autoload": {
"psr-0": {
"": "src/"
}
},
"minimum-stability": "dev",
"authors": [
{
"name": "xxx",
"email": "xxx"
}
],
"require": {
"php": ">=5.3.2",
"ext-iconv": "*",
"ext-intl": "*",
"igorw/composer-yaml": "dev-master",
"symfony/symfony": "2.1.*",
"doctrine/orm": ">=2.2.3,<2.4-dev",
"doctrine/doctrine-bundle": "1.0.*",
"twig/extensions": "1.0.*",
"symfony/assetic-bundle": "2.1.*",
"symfony/swiftmailer-bundle": "2.1.*",
"symfony/monolog-bundle": "2.1.*",
"sensio/distribution-bundle": "2.1.*",
"sensio/framework-extra-bundle": "2.1.*",
"sensio/generator-bundle": "2.1.*",
"jms/security-extra-bundle": "1.2.*",
"jms/di-extra-bundle": "1.1.*",
"propel/propel-bundle": "1.1.*"
},
"scripts": {
"post-install-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
],
"post-update-cmd": [
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap"
]
},
"config": {
"bin-dir": "bin"
},
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web"
}
}
I followed the installation of propel on http://www.propelorm.org/cookbook/symfony2/working-with-symfony2.html
then I used the comman
php app/console propel:form:generate #AcmeDemoBundle Book Author
and it throws following exception:
[ErrorException]
Catchable Fatal Error: Argument 1 passed to Propel\PropelBundle\Command\AbstractCommand::getSchemasFromBundle()
must implement interface Symfony\Component\HttpKernel\Bundle\BundleInterface, null given,
called in \vendor\propel\propel-bundle\Propel\PropelBundle\Command\FormGenerateCommand.php on line 55
and defined in \vendor\propel\propel-bundle\Propel\PropelBundle\Command\AbstractCommand.php line 268
I have tried this a few times (creating new projects and following the installation instruction of propel); I also tried it by installing all tags (one after another) of branch 1.1, but i always get the ErrorException from above.
I have searched if someone has the same problem, but I haven´t found anybody and I don´t know anymore what I could do.
which is your os?
if its windows and you use powershell then you might have the same problem as me. the # sign is an operator in powershell (see What does the "#" symbol do in Powershell?)
so in the windows powershell the bundle name has to be quoted
php app/console propel:form:generate '#AcmeStoreBundle'
maybe the problem also appears on other operation systems
official issue: https://github.com/propelorm/PropelBundle/issues/180
Related
I have simply copy and paste plugin( plugin name is websitetoolbox) folder to craft cms4's vendor folder. And modify root composer.json like below.
{
"require": {
"craftcms/cms": "^4.2.0.2",
"swishdigital/template-selector": "^1.0",
"vlucas/phpdotenv": "^5.4.0",
"websitetoolbox/websitetoolboxforum": "1.4.0"
},
"require-dev": {
"yiisoft/yii2-shell": "^2.0.3"
},
"autoload": {
"psr-4": {
"modules\\": "modules/"
}
},
"config": {
"allow-plugins": {
"craftcms/plugin-installer": true,
"yiisoft/yii2-composer": true
},
"sort-packages": true,
"optimize-autoloader": true,
"platform": {
"php": "8.0.2"
}
},
"scripts": {
"post-root-package-install": [
"#php -r \"file_exists('.env') || copy('.env.example', '.env');\""
]
},
"minimum-stability": "dev",
"prefer-stable": true
}
When I run command composer update it gives below error
Problem 1
- Root composer.json requires websitetoolbox/websitetoolboxforum 1.4.0, found websitetoolbox/websitetoolboxforum[dev-master, 1.0.0, 1.3.0] but it does not match the constraint.
The line:
"websitetoolbox/websitetoolboxforum": "1.4.0"
Should probably be:
"websitetoolbox/websitetoolboxforum": "1.3.0"
I'm no expert on semantic versioning, but it seems a bit odd that you have a higher version number? Could it be a typo on your end? Cause if another dependency requires this version you might be in trouble.
encounter the below message when trying to firebase deploy from root project
Error: Parse Error in ...\firestore.indexes.json
Unexpected token '�' at 1:1
��{
I have a flutter app, upon which I also have a functions folder. Below is the file position:
AppFolder
functions
.eslintrc.js
index.js
package.json
etc
lib
files relative to flutter app
test
test files relative to flutter app
web firestore.indexes.json
firebase.json
etc
I am running on windows 11 in a newly built pc (so maybe sth is missing?), other devs are running on mac, I have changed the EOF sequence to LF on the 3 files of the functions folder, I have also run these two commands inside the functions folder
npm install firebase-functions#latest firebase-admin#latest --save
npm install -g firebase-tools
npm version is 8.1.2
node version is v16.13.1
firestore.indexes.json is:
{
"indexes": [
{
"collectionGroup": "something1",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "created",
"order": "DESCENDING"
},
{
"fieldPath": "something2",
"order": "DESCENDING"
}
]
},
{
"collectionGroup": "something3",
"queryScope": "COLLECTION",
"fields": [
{
"fieldPath": "something4",
"order": "ASCENDING"
},
{
"fieldPath": "something5",
"order": "DESCENDING"
}
]
}
],
"fieldOverrides": []
}
.elslint.js is
module.exports = {
"root": true,
"env": {
es6: true,
node: true,
},
"extends": [
"eslint:recommended",
"google",
],
"rules": {
quotes: ["error", "double"],
},
"parserOptions": {
"ecmaVersion": 2020,
},
};
and package.json is
"name": "functions",
"description": "Cloud Functions for Firebase",
"scripts": {
"lint": "eslint .",
"serve": "firebase emulators:start --only functions",
"shell": "firebase functions:shell",
"start": "npm run shell",
"deploy": "firebase deploy --only functions",
"logs": "firebase functions:log"
},
"engines": {
"node": "14"
},
"main": "index.js",
"dependencies": {
"axios": "^0.24.0",
"device-detector-js": "^3.0.0",
"firebase": "^9.2.0",
"firebase-admin": "^10.0.1",
"firebase-functions": "^3.16.0"
},
"devDependencies": {
"eslint": "^8.1.0",
"eslint-config-google": "^0.14.0",
"firebase-functions-test": "^0.3.3"
},
"private": true
}
Please keep in mind that in an older pc running windows 10 and I can deploy by changing only to the LF and running the above commands.
Just try to make a new text file and copy the content of generated file inside the new one. Then override the new file with firestore.indexes.json
Its obvious that the generated json file has some formatting problem.
I recently had this problem and found that it was resolved by changes to the firebase.json file:
Seek "predeploy":
Delete the code so that the outcome is "predeploy": []
After this, run the firebase deploy function again, and everything should be fine.
Thank you to Max for sharing this solution with me : )
I get this error while trying to install the Mopa bootstrap bundle through command line:
"C:\ProgramData\ComposerSetup\bin\composer.bat" require
mopa/bootstrap-bundle ^3.0
Error:
installation failed reverting ./composer.json to its original content
mopa
require [--dev] [--prefer-source] [--prefer-dist] [--no-progress]
[--no-suggest] [--no-update] [--no-scripts] [--update-no-dev]
[--update-with-dependencies] [--ignore-platform-reqs]
[--prefer-stable] [--prefer-lowest] [--sort-packages]
[-o|--optimize-autoloader] [-a|--classmap-authoritative]
[--apcu-autoloader] [--] []...
Im lost since I`m not getting any explanation of what failed.
So listen here, I have a solution for you. As I see that you are working with composer I'll teach you how to do it.
First you must change your "composer.json" file in your project, adding in "require" section:
"require": {
...
"mopa/bootstrap-bundle": "*",
"twbs/bootstrap": "*",
"knplabs/knp-menu-bundle": "*"
}
(NOTE: "knplabs/knp-menu-bundle": "*" is recommended to put as well when you use twbs).
And then add this repository in the json:
"repositories": [
{
"type": "package",
"package": {
"version": "2.2.1",
"name": "twitter/bootstrap",
"source": {
"url": "https://github.com/twitter/bootstrap.git",
"type": "git",
"reference": "master"
},
"dist": {
"url": "https://github.com/twitter/bootstrap/zipball/master",
"type": "zip"
}
}
}
]
Save and finally, you should execute your composer update(dev) command.
Hope it works!
I'm developping a web app using Lumen. I followed the instructions from the doc, installing laravel/lumen-installer via Composer, then doing lumen new myApp to get it properly installed (it was in April 2015).
While working on queues, the method "onQueue" was (and still is) not found... I presume I have an old version of the package "Illuminate/queue" (or what else?). Checking on packagist, Lumen is now in v5.1.5 (https://packagist.org/packages/laravel/lumen-framework) and the one I'm using is v5.0.4. So I did an update with composer :
composer update laravel/lumen-framework
But I get the v5.0.10, not the 5.1.4. Why so?
I checked that issue: https://github.com/dingo/api/issues/447 but in my composer.json, I have:
"config": {
"preferred-install": "dist"
}
So what is the problem? How can I get the last version of Lumen? Moreover, how can I get the onQueue method (updating only the package "Illuminate/queue")?
Thanks in advance
UPDATE, as asked in comments below, this is my initial composer.json (just not to miss anything):
{
"require": {
"laravel/lumen-installer": "~1.0"
}
}
and myApp composer.json:
{
"name": "laravel/lumen",
"description": "The Laravel Lumen Framework.",
"keywords": ["framework", "laravel", "lumen"],
"license": "MIT",
"type": "project",
"require": {
"laravel/lumen-framework": "5.0.*",
"vlucas/phpdotenv": "~1.0",
"illuminate/mail": "~5.0",
"imagine/imagine": "^0.6.2",
"league/csv": "^7.1",
"gregwar/captcha": "^1.1",
"neitanod/forceutf8": "^1.4",
"predis/predis": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
},
"autoload": {
"psr-4": {
"App\\": "app/",
}
},
"autoload-dev": {
"classmap": [
"tests/"
]
},
"config": {
"preferred-install": "dist"
}
}
You have to update your composer.json
"require": {
"php": ">=5.5.9",
"laravel/lumen-framework": "5.1.*",
"vlucas/phpdotenv": "~1.0"
},
I have this project on Github and Packagist:
https://github.com/gitraffa/framework
https://packagist.org/packages/gitraffa/framework
I want to use this as a deploy app, so, when I need to start a new project I just go to the cmd and type composer create-project gitraffa/framework --prefer-distand it should automatically create the folder and inser the files. But it isn't working(I always get something saying that a stable version could not be found). Am I doing something wrong or can't this be done?
Here is my composer.json file:
{
"name": "gitraffa/framework",
"description": "A powerful yet easy-to-use PHP micro-framework designed to help you build dynamic and robust Web applications - fast!",
"homepage": "http://rafaelmsantos.com/",
"license": "GPL-3.0",
"authors": [
{
"name": "Rafael Santos",
"email": "dev.rafael#mail.com",
"homepage": "http://rafaelmsantos.com"
}
],
"require": {
"php": ">=5.3.6",
"psr/log": "~1.0"
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/gitraffa/framework"
}
],
"extra": {
"branch-alias": {
"dev-master": "1.0.0"
}
}
}
Composer by default installs only tagged versions (last stable that meets condition).
The error message can be fixed by:
using #dev tag, like: composer create-project gitraffa/framework:#dev --prefer-dist
tagging your package