I have a running CakePHP 3 project on which I use Phinx migrations. This morning I just changed one migration file, didn't do a rollback, but instead I dropped all tables and hoped that it will just re-run the migrations as before. So when I issue these commands:
bin/cake migrations migrate
bin/cake migrations rollback
bin/cake migrations status
Or whatever related to migrations, I get the following exception thrown in the CLI:
Exception: Argument 2 passed to Phinx\Migration\Manager::__construct() must
implement interface Symfony\Component\Console\Input\InputInterface, instance of
Symfony\Component\Console\Output\ConsoleOutput given, called in
/var/www/html/vendor/cakephp/migrations/src/ConfigurationTrait.php on line 191
in [/var/www/html/vendor/robmorgan/phinx/src/Phinx/Migration/Manager.php, line 89]
I have tried re-running composer update / install even dump-autoload, but nothing changed.
I do not know where to start debugging this.
One thing worth mentioning is that I use a custom error handler, for both the CLI and the web interaface. Respectivelly both of my custom error handlers extend their appopriate classes: \Cake\Console\ConsoleErrorHandler and \Cake\Error\ErrorHandler.
When I run composer info I get this output:
ajgl/breakpoint-twig-extension 0.3.1 Twig extension to set breakpoints
aptoma/twig-markdown 2.0.0 Twig extension to work with Markdown content
asm89/twig-cache-extension 1.3.2 Cache fragments of templates directly within Twig.
aura/intl 3.0.0 The Aura Intl package provides internationalization tools, specifically message trans...
cakephp/bake 1.7.2 Bake plugin for CakePHP 3
cakephp/cakephp 3.6.1 The CakePHP framework
cakephp/cakephp-codesniffer 3.0.3 CakePHP CodeSniffer Standards
cakephp/chronos 1.1.4 A simple API extension for DateTime.
cakephp/debug_kit 3.15.2 CakePHP Debug Kit
cakephp/migrations 1.3 Database Migration plugin for CakePHP 3.0 based on Phinx
cakephp/plugin-installer 1.1.0 A composer installer for CakePHP 3.0+ plugins.
composer/ca-bundle 1.1.1 Lets you find a path to the system CA bundle, and includes a fallback to the Mozilla ...
composer/composer 1.6.4 Composer helps you declare, manage and install dependencies of PHP projects, ensuring...
composer/semver 1.4.2 Semver library that offers utilities, version constraint parsing and validation.
composer/spdx-licenses 1.3.0 SPDX licenses list and validation library.
crabstudio/recaptcha 2.1.0 Easily use Google Recaptcha in CakePHP 3.2+ projects
dnoegel/php-xdg-base-dir 0.1 implementation of xdg base directory specification for php
florianwolters/component-core-stringutils v0.3.1 Offers operations on the data type string as a PHP component.
florianwolters/component-util-reflection v0.2.0 Provides operations for the PHP Reflection API as a PHP component.
florianwolters/component-util-singleton v0.3.2 The Singleton (and Registry of Singletons a.k.a. Multiton) design pattern as a PHP co...
guzzlehttp/guzzle 6.3.3 Guzzle is a PHP HTTP client library
guzzlehttp/promises v1.3.1 Guzzle promises library
guzzlehttp/psr7 1.4.2 PSR-7 message implementation that also provides common utility methods
jakub-onderka/php-console-color 0.1
jakub-onderka/php-console-highlighter v0.3.2
jasny/twig-extensions v1.2.0 A set of useful Twig filters
jdorn/sql-formatter v1.2.17 a PHP SQL highlighting library
josegonzalez/dotenv 2.1.0 dotenv file parsing for PHP
justinrainbow/json-schema 5.2.7 A library to validate a json schema.
m1/env 2.1.0 Env is a lightweight library bringing .env file parser compatibility to PHP. In short...
mnsami/composer-custom-directory-installer 1.1.1 A composer plugin, to help install packages of different types in custom paths.
mobiledetect/mobiledetectlib 2.8.31 Mobile_Detect is a lightweight PHP class for detecting mobile devices. It uses the Us...
nikic/php-parser v4.0.1 A PHP parser written in PHP
predis/predis v1.1.1 Flexible and feature-complete Redis client for PHP and HHVM
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.0.2 Common interface for logging libraries
psy/psysh v0.9.3 An interactive shell for modern PHP.
robmorgan/phinx 0.9.2 Phinx makes it ridiculously easy to manage the database migrations for your PHP app.
seld/cli-prompt 1.0.3 Allows you to prompt for user input on the command line, and optionally hide the char...
seld/jsonlint 1.7.1 JSON Linter
seld/phar-utils 1.0.1 PHAR file format utilities, for when PHP phars you up
squizlabs/php_codesniffer 3.2.3 PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a d...
symfony/config v4.0.8 Symfony Config Component
symfony/console v4.0.8 Symfony Console Component
symfony/filesystem v4.0.8 Symfony Filesystem Component
symfony/finder v4.0.8 Symfony Finder Component
symfony/polyfill-mbstring v1.7.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72 v1.7.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/process v4.0.8 Symfony Process Component
symfony/var-dumper v4.0.8 Symfony mechanism for exploring and dumping PHP variables
symfony/yaml v4.0.8 Symfony Yaml Component
twig/twig v1.35.3 Twig, the flexible, fast, and secure template language for PHP
umpirsky/twig-php-function v0.1 Call (almost) any PHP function from your Twig templates.
wyrihaximus/twig-view 4.3.4 Twig powered View for CakePHP3
zendframework/zend-diactoros 1.7.1 PSR HTTP Message implementations
And the contents of composer.json file are as:
{
"name": "cakephp/app",
"description": "CakePHP skeleton app",
"homepage": "https://cakephp.org",
"type": "project",
"license": "MIT",
"require": {
"php": ">=5.6",
"cakephp/cakephp": "^3.5",
"cakephp/migrations": "^1.8",
"cakephp/plugin-installer": "^1.0",
"crabstudio/recaptcha": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"josegonzalez/dotenv": "2.*",
"mobiledetect/mobiledetectlib": "2.*"
},
"require-dev": {
"cakephp/bake": "^1.1",
"cakephp/cakephp-codesniffer": "^3.0",
"cakephp/debug_kit": "^3.2",
"psy/psysh": "#stable"
},
"suggest": {
"markstory/asset_compress": "An asset compression plugin which provides file concatenation and a flexible filter system for preprocessing and minification.",
"dereuromark/cakephp-ide-helper": "After baking your code, this keeps your annotations in sync with the code evolving from there on for maximum IDE and PHPStan compatibility.",
"phpunit/phpunit": "Allows automated tests to be run without system-wide install.",
"cakephp/cakephp-codesniffer": "Allows to check the code against the coding standards used in CakePHP."
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Test\\": "tests/",
"Cake\\Test\\": "vendor/cakephp/cakephp/tests/"
}
},
"scripts": {
"post-install-cmd": "App\\Console\\Installer::postInstall",
"post-create-project-cmd": "App\\Console\\Installer::postInstall",
"post-autoload-dump": "Cake\\Composer\\Installer\\PluginInstaller::postAutoloadDump",
"check": [
"#test",
"#cs-check"
],
"cs-check": "phpcs --colors -p --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"cs-fix": "phpcbf --colors --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests",
"test": "phpunit --colors=always"
},
"prefer-stable": true,
"config": {
"sort-packages": true
}
}
It looks like your composer packages got out of sync.
To force a refresh delete the vendor folder also delete composer.lock and then run
composer install
It will download everything again, rebuild your vendor and make sure Phinx and Symphony are in sync again.
After you do this, you run your migrations again and see what happens.
This statement of yours
"I dropped all tables and hoped that it will just re-run the migrations as before."
worries me a bit, because the Phinx migration manger keeps its log in the database in a table called phinxlog (sometimes prefixed with a plugin name if you're talking about a plugin). If you deleted that then phix does not know what migrations did you run already and which ones are new. To fix this you may need to mark some of the earlier migrations are migrated so phinx does not attempt to do things that were already done.
Related
I followed both the Codeception and general PHP instructions in our wiki when I set up my project in PhpStorm. It worked perfectly with both the ./vendor/bin/codecept run and docker-compose run --rm codecept run ui_automation --env staging --debug for over a day. Now, when I run the same project, it attempts the first test and just hangs at this part:
julie#Julies-MacBook-Pro qa-tests % ./vendor/bin/codecept run
Codeception PHP Testing Framework v4.1.9
Powered by PHPUnit 9.4.2 by Sebastian Bergmann and contributors.
Running with seed:
Ui_automation Tests (2) --------------------------------------------------------------------
------------------------------------------------------------------------
- LoginCest: Test login
My environment is as such:
php 7.4.12
Mac OS Catalina 10.15.6
Composer 2.0.5
Codecept 4.1.11
Docker 19.03.13
And when I try to run it with the docker command I get this error. I was originally getting this error with the above command too but now I'm just getting it for the docker command:
julie#Julies-MacBook-Pro qa-tests % docker-compose run --rm codecept run ui_automation --
env staging --debug
Starting qa-end-to-end-tests_db_1 ... done
Creating qa-end-to-end-tests_codecept_run ... done
==== Redirecting to Composer-installed version in vendor/codeception. You can skip this
using --no-redirect ====
Command "run " is not defined.
I wasn't doing anything other than adding locators when this problem suddenly appeared. Also I used to verify the flow through a VNCView window and I can see there that my project is pulling up Chrome but not going to any page.
https://github.com/Codeception/Codeception/issues/5495 says about the redirect line in the error, "This redirect is here for a reason - it prevents odd errors when different versions of Codeception or dependencies are installed in vendor dir and external locations and some classes are loaded from one place and some - from another." But, it doesn't give tips on how to resolve this.
I initially was following two sets of instructions, I may have set up composer twice (once with wget and once with homebrew) and tried fixing from that angle. I also was setting up my mac in it's entirety the same day so it's possible I downloaded something else that is somehow conflicting.
I have tried the following:
Using both PhpStorm and VSCode, both IDEs display the same behavior
Running ./vendor/bin/codecept clean and .vendor/bin/codecept build
Updating with "composer update" command
restarting IDEs, computer
Deleted composer according to these instructions: Remove composer
Re-installed composer with homebrew only
Uninstalled and reinstalled docker according to these instructions: https://nektony.com/how-to/uninstall-docker-on-mac
Added codeception/verify and codeception/specify to my composer.json
Made sure the URL the page is supposed to go to is still in my yaml file under Webdriver, URL
Noticed a "No CLI interpreter" in my Edit Configuration page in IntelliJ so re-added that and set PHP 7.4 to Interpreter). This was using the executable /usr/local/Cellar/php/7.4.12/bin/php
Looked in preferences and module settings, didn't see anything weird
Ran in verbose mode (-vvv) didn't get hints from that
Blew out my whole git repo and re-imported it
Ran composer show, saw many codeception packages
Ran autoload dump
Ran Tools > Composer > Diagnose in both regular and verbose and got back "Composer diagnosed some issues in ./composer.json." but it doesn't tell me what those issues are and there is nothing lit up or red in composer.json
Deleted the whole vendor folder and reinstalled composer
I now notice after the last step composer.phar is red! I have tried repeating the steps above but it is still red.
Right now I'd just like to get my project working through the regular ./vendor/bin/codecept run bc I have SREs to help with the Docker stuff, although I'd be happy to skip straight to docker working as that's how they'd like us to run it.
My composer.json (without the specify, verify troubleshooting step):
{
"require-dev": {
"codeception/robo-paracept": "^0.4.2",
"codeception/codeception": "^4.1",
"codeception/module-phpbrowser": "^1.0.0",
"codeception/module-asserts": "^1.0.0",
"codeception/module-webdriver": "^1.1",
"codeception/verify": "2.1.0",
"codeception/specify": "1.4.0",
"phpunit/phpunit": "^9.4"
},
"require": {
"ext-zip": "^1.15",
"codeception/specify": "*",
"codeception/verify": "*"
},
"autoload": {
"psr-4": {
"Tests\\Support\\": "tests/_support",
"UiAutomationTester\\": "tests/_support/UiAutomation.php"
}
}
}
I updated composer to 4.1.11 and verified that ./vendor/bin/codecept run -V matched the version in composer.json
composer -V says it's at Composer version 2.0.5
Results of composer-show:
codeception/lib-asserts 1.13.2 Assertion methods used by
Codeception core and Asserts module
codeception/lib-innerbrowser 1.3.4 Parent library for all Codeception framework modules and PhpBrowser
codeception/module-asserts 1.3.1 Codeception module containing various assertions
codeception/module-phpbrowser 1.0.2 Codeception module for testing web application over HTTP
codeception/module-webdriver 1.1.3 WebDriver module for Codeception
codeception/phpunit-wrapper 9.0.5 PHPUnit classes used by Codeception
codeception/robo-paracept 0.4.2 Codeception Parallel Execution Tasks via Robo Task Runner
codeception/stub 3.7.0 Flexible Stub wrapper for PHPUnit's Mock Builder
consolidation/annotated-command 4.2.3 Initialize Symfony Console commands from annotated command class methods.
consolidation/config 1.2.1 Provide configuration services for a commandline tool.
consolidation/log 2.0.1 Improved Psr-3 / Psr\Log logger based on Symfony Console components.
consolidation/output-formatters 4.1.1 Format text by applying transformations provided by plug-in formatters.
consolidation/robo 1.4.13 Modern task runner
consolidation/self-update 1.2.0 Provides a self:update command for Symfony Console applications.
container-interop/container-interop 1.2.0 Promoting the interoperability of container objects (DIC, SL, etc.)
dflydev/dot-access-data v1.1.0 Given a deep data structure, access data by dot notation.
doctrine/instantiator 1.3.1 A small, lightweight utility to instantiate objects in PHP without invoking their constr...
grasmash/expander 1.0.0 Expands internal property references in PHP arrays file.
grasmash/yaml-expander 1.4.0 Expands internal property references in a yaml file.
guzzlehttp/guzzle 7.2.0 Guzzle is a PHP HTTP client library
guzzlehttp/promises 1.4.0 Guzzle promises library
guzzlehttp/psr7 1.7.0 PSR-7 message implementation that also provides common utility methods
league/container 2.4.1 A fast and intuitive dependency injection container.
monolog/monolog 2.1.1 Sends your logs to files, sockets, inboxes, databases and various web services
myclabs/deep-copy 1.10.1 Create deep copies (clones) of your objects
nikic/php-parser v4.10.2 A PHP parser written in PHP
phar-io/manifest 2.0.1 Component for reading phar.io manifest information from a PHP Archive (PHAR)
phar-io/version 3.0.2 Library for handling version information and constraints
php-webdriver/webdriver 1.8.3 A PHP client for Selenium WebDriver. Previously facebook/webdriver.
phpdocumentor/reflection-common 2.2.0 Common reflection classes used by phpdocumentor to reflect the code structure
phpdocumentor/reflection-docblock 5.2.2 With this component, a library can provide support for annotations via DocBlocks or othe...
phpdocumentor/type-resolver 1.4.0 A PSR-5 based resolver of Class names, Types and Structural Element Names
phpspec/prophecy 1.12.1 Highly opinionated mocking framework for PHP 5.3+
phpunit/php-code-coverage 9.2.3 Library that provides collection, processing, and rendering functionality for PHP code c...
phpunit/php-file-iterator 3.0.5 FilterIterator implementation that filters files based on a list of suffixes.
phpunit/php-invoker 3.1.1 Invoke callables with a timeout
phpunit/php-text-template 2.0.4 Simple template engine.
phpunit/php-timer 5.0.3 Utility class for timing
phpunit/phpunit 9.4.2 The PHP Unit Testing framework.
psr/container 1.0.0 Common Container Interface (PHP FIG PSR-11)
psr/http-client 1.0.1 Common interface for HTTP clients
psr/http-message 1.0.1 Common interface for HTTP messages
psr/log 1.1.3 Common interface for logging libraries
ralouphie/getallheaders 3.0.3 A polyfill for getallheaders.
sebastian/cli-parser 1.0.1 Library for parsing CLI options
sebastian/code-unit 1.0.8 Collection of value objects that represent the PHP code units
sebastian/code-unit-reverse-lookup 2.0.3 Looks up which function or method a line of code belongs to
sebastian/comparator 4.0.6 Provides the functionality to compare PHP values for equality
sebastian/complexity 2.0.2 Library for calculating the complexity of PHP code units
sebastian/diff 4.0.4 Diff implementation
sebastian/environment 5.1.3 Provides functionality to handle HHVM/PHP environments
sebastian/exporter 4.0.3 Provides the functionality to export PHP variables for visualization
sebastian/global-state 5.0.2 Snapshotting of global state
sebastian/lines-of-code 1.0.2 Library for counting the lines of code in PHP source code
sebastian/object-enumerator 4.0.4 Traverses array structures and object graphs to enumerate all referenced objects
sebastian/object-reflector 2.0.4 Allows reflection of object attributes, including inherited and non-public ones
sebastian/recursion-context 4.0.4 Provides functionality to recursively process PHP variables
sebastian/resource-operations 3.0.3 Provides a list of PHP built-in functions that operate on resources
sebastian/type 2.3.1 Collection of value objects that represent the types of the PHP type system
sebastian/version 3.0.2 Library that helps with managing the version number of Git-hosted PHP projects
symfony/browser-kit v5.1.8 Symfony BrowserKit Component
symfony/console v4.4.16 Symfony Console Component
symfony/css-selector v5.1.8 Symfony CssSelector Component
symfony/dom-crawler v5.1.8 Symfony DomCrawler Component
symfony/event-dispatcher v4.4.16 Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.9 Generic abstractions related to dispatching event
symfony/filesystem v4.4.16 Symfony Filesystem Component
symfony/finder v5.1.8 Symfony Finder Component
symfony/polyfill-ctype v1.20.0 Symfony polyfill for ctype functions
symfony/polyfill-mbstring v1.20.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php73 v1.20.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/polyfill-php80 v1.20.0 Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions
symfony/process v4.4.16 Symfony Process Component
symfony/service-contracts v2.2.0 Generic abstractions related to writing services
symfony/yaml v4.4.16 Symfony Yaml Component
theseer/tokenizer 1.2.0 A small library for converting tokenized PHP source code into XML and potentially other ...
webmozart/assert 1.9.1 Assertions to validate method input/output with nice error messages.
I don't know much about PHP set up or Codeception, this is my first project in either. This is running on everyone else's machine in QA except mine!
I have a Symfony 4 project and am trying to install this package for working with AWS DynamoDB.
When I run composer require oasis/dynamodb-odm I get an error saying oasis/dynamodb-odm v0.5.3 requires symfony/console ^3.2 -> no matching package found. Attempting to run composer require symfony/console:^3.2 also results in the "Could not find package..." error.
As I am using Symfony 4, composer commands are intercepted by Symfony Flex and some extra stuff happens. Interestingly, there is a Flex recipe for symfony/console:3.3 but not 3.2 which I imagine might be the problem.
My understanding of the caret is that it should allow minor version bumps, so I wonder why console v3.3 is not installed instead.
I would like to use this package, and there aren't many DynamoDB PHP offerings out there, so how can I resolve this issue?
if you checkout the composer.json file of the package, you can see the following
"require" : {
"php" : ">=5.6",
"doctrine/annotations": "^1.4",
"oasis/aws-wrappers" : "^2.10",
"oasis/logging" : "^1.0",
"doctrine/common" : "^2.7",
"symfony/console" : "^3.2",
"symfony/finder" : "^3.2"
},
meaning it is compatible with symfony3 only.
Probably you can fork the repo and try changing the version numbers and test it. If it works you can install it.
I have several packages. One depends on a virtual package that 2 of the others provides. For the simplicity sake I am only focusing on packageA (package that requires the virtual) and packageB (one of the packages that provides the virtual).
PackageA
{
"require": {
"mynamespace/package-virtual": "1.0"
},
"suggest": {
"mynamespace/packageB": "PackageB provides package-virtual",
"mynamespace/packageC": "PackageC also provides package-virtual and can be installed with or without PackageB being present"
},
"minimum-stability": "dev"
}
PackageB
{
"provide": {
"mynamespace/package-virtual": "1.0"
},
"minimum-stability": "dev"
}
This all worked fine while I was using dev-master as a requirement for both packges in my application that used both of these packages:
MyAPP using dev-master
{
"require": {
"mynamespace/packageA": "dev-master",
"mynamespace/packageB": "dev-master"
},
"minimum-stability": "dev",
"prefer-stable": true
}
However, when I tagged 1.0.0-rc1 on each package and attempted to change my dev requirement to 1.0.x-dev composer started complaining that it could not find mynamespace/package-virtual
MyAPP using 1.0.x-dev
{
"require": {
"mynamespace/packageA": "1.0.x-dev",
"mynamespace/packageB": "1.0.x-dev"
},
"minimum-stability": "dev",
"prefer-stable": true
}
Running composer update
# composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for mynamespace/packageA 1.0.x-dev -> satisfiable by mynamespace/packageA[1.0.x-dev].
- mynamespace/packageA 1.0.x-dev requires mynamespace/package-virtual 1.0 -> no matching package found.
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.
Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
Things I have already tried
Changing the requires line for mynamespace/package-virtual to ^1.0 in mynamespace/packageA
Changing the requires line for mynamespace/package-virtual to 1.0.* in mynamespace/packageA
Changing the provides line for mynamespace/package-virtual to 1.* in mynamespace/packageB
Why am I using a virtual and not just requiring packageB
Because packageB is only a possible implementation of the virtual package. packageC or some other package could potentially be used instead.
Why am I not using replaces instead of provides
Because packageB and packageC could both implement the virtual package and co-exist. MyAPP may choose to use packageB in some scenarios and packageC in others. Compare all of this to logging packages. psr/log provides the interfaces for logging, but you must install one or more logging implementations to actually use it for logging. Many different loggers implement the necessary interfaces and could all be installed simultaneously allowing the application to provide the user a selection of logging services to use.
Why am I providing psuedo code instead of the actual composer.json files
Because the code I am working on is not currently publicly available. At some point it may be, but it is not now
If the code isn't publicly installable, how are you installing via composer?
I am running Toran Proxy locally
Question
What am I doing wrong? Why did this all work fine under dev-master but start failing once I tagged an RC and moved to a version branch.
So I am not sure if this is the actual answer, but if I run composer installinstead of composer update after clearing the mynamspace directory from vendor, everything works fine.
I also did find that using Satis instead of Toran seemed to work fine with composer update as well.
I downloaded and setup an Sonata's Sonata-Sandbox Bundle for Symfony2. I'm using Symfony 2.2.2. It's a good package and contains mostly used packages installed.
After installation I decided not to use SonataPageBundle that's included in package because it overrides all my Bundle's but unable to remove it.
I tried to remove it from composer.json and tried a php composer.phar update but no luck, update is always failing because of the dependency other libraries.
Actually, I need SonataAdminBundle with Media library on any version of Symfony 2.x. I found other solutions to install Symfony 2 + SonataAdminBundle + etc but they are also failing on different version support in composer.json and could't make a successful installation manually.
I'm on Mac 10.8 and BitNapi MAMP Stack 5.4.15-0 with PHP 5.3
Are there any better ways to install these extensions to Symfony 2?
Yes, you can use composer to install only the Sonata bundles you need. Here's mine, which is about as short as it gets for Sonata using Doctrine:
"require": {
"sonata-project/admin-bundle": "dev-master",
"sonata-project/doctrine-orm-admin-bundle": "dev-master",
"sonata-project/user-bundle": "dev-master",
"sonata-project/media-bundle": "dev-master"
}
If you haven't actually started coding anything, you might want to start a new project because removing PageBundle is slightly tedious and reinstalling using this guide is simple and basically three simple steps:
Install composer:
curl -s https://getcomposer.org/installer | php
Download Symfony2:
php composer.phar create-project symfony/framework-standard-edition /path/to/webroot/Symfony 2.3.0
Then you can add the bundles you need in composer.json and run
php composer.phar update
I need to install Zend_XmlRpc module into my Symfony 2.1 application.
I tried the obvious way using composer.json dependencies:
"require": {
...
"zendframework/zend-xmlrpc": "dev-master"
},
I got the following problems:
- Installation request for zendframework/zend-xmlrpc dev-master -> satisfiable by zendframework/zend-xmlrpc dev-master.
- zendframework/zend-xmlrpc dev-master requires zendframework/zend-http dev-master -> no matching package found.
I'have added the package requirements from the https://packagist.org/packages/zendframework/zend-xmlrpc
"zendframework/zend-http": "dev-master",
"zendframework/zend-math": "dev-master",
"zendframework/zend-server": "dev-master",
"zendframework/zend-stdlib": "dev-master",
"zendframework/zend-xmlrpc": "dev-master"
But now I've got more problems as each of this package has it's own requirements.
My issue is that I have browsed all these requirements and in the end I am ending with installing the "whole" framework.
I get the http package, the loader package, event manager, which I am pretty sure symfony already got them.
Isn't there a way to integrate only the XMLRPC package and maybe bridge the functioanlity with the already existing one from Symfony components?
And if there isn't any solution, how can I force composer to auto install recursively all the required dependencies, as there are many of them, and is weird work to add them manually.
I don't see any reason for use the unstable version of the package.
Instead add
"require": {
...
"zendframework/zend-xmlrpc": "2.1.*"
},