Closed maniqui closed 10 years ago
Nah, thank you for trying it out.
Yeah. Actually neither installing or uninstalling of the plugin works properly at the moment. Currently the development version is trying to load 'Rah_Danpu_Dump' class on the runtime, but that will not work since the its not included in the autoloader during the initial installation; the autoloader is updated by Composer after the installation.
This issue is relatively easy to fix. Its all just a stupid oversight by me. The ideal real solution would be to have autoload-able plugins (plugins truly split to multiple smaller files), but Textpattern's plugin system ain't that great.
This has been resolved. The plugin is now fully installable via Composer.
Thanks for the follow-up.
For the record. On an existing Txp installation which already had rah_backup installed, I first tred:
$ composer require rah/rah_backup
Please provide a version constraint for the rah/rah_backup requirement: dev-master
./composer.json has been updated
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 rah/danpu == 1.5.0.0 -> satisfiable by rah/danpu[1.5.0].
- rah/rah_backup dev-master requires rah/danpu 2.6.2 -> satisfiable by rah/danpu[2.6.2].
- rah/rah_backup dev-master requires rah/danpu 2.6.2 -> satisfiable by rah/danpu[2.6.2].
- Conclusion: don't install rah/danpu 2.6.2
- Installation request for rah/rah_backup dev-master -> satisfiable by rah/rah_backup[dev-master].
Installation failed, reverting ./composer.json to its original content.
Then, as suggested in the rah_backup README I've tried:
$ composer require rah/rah_backup:*
./composer.json has been updated
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 rah/rah_backup * -> satisfiable by rah/rah_backup[dev-master].
- Removal request for rah/rah_backup == 9999999-dev
Installation failed, reverting ./composer.json to its original content.
As I'm new to all-things composer and I've already forgot my lessons from 2 months ago, I finally tried:
$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
- Removing rah/danpu (1.5.0)
- Installing rah/danpu (2.6.2)
Downloading: 100%
- Removing rah/rah_autoload (0.2.1)
- Installing rah/rah_autoload (0.3.0)
Downloading: 100%
- Updating rah/rah_backup dev-master (b310f36 => 0ac54df)
Checking out 0ac54df6949202a528ecd3888f1a9c1dfe3619c1
which also updated some other packages (which I removed from the output above).
Now, of course, that composer update
was probably a bit extreme for just updating rah_backup.
@gocom gocom, could you please shed some light on how should I've proceeded to properly update/re-install rah_backup?
Thanks.
For the record. On an existing Txp installation which already had rah_backup installed, I first tred:
The previous versions weren't installable. I guess you have installed after I've patched it, as otherwise it would be impossible to get up and running; you will have to manually enable it and re-generate Composer's autoloaders.
which also updated some other packages
It's not truly extreme and you actually should update packages. You just should take care that your version constraints are set properly (normally to patches) and the packages you are consuming follow semantic versioning guidelines. Avoid unknown packages where the developer doesn't tag releases or where version numbers are inconsistent.
As for the command, see help pages for up-to-date instructions:
$ composer help
$ composer help update
$ composer help require
The update command accepts list of packages that restricts the update to specific set of packages:
$ composer update rah/rah_backup
Issuing this will update the package and its dependencies according to the version constraints. If you want to consume new unstable package, make sure to use a proper flag in the version constraint:
$ composer require rah/rah_backup:*@dev
Or edit the composer.json to contain flagged constraint.
I've got some errors during install. Now, I'm not sure if the plugin has been fully (and properly) installed nor if it's properly working (didn't test it yet), although I can see both
rah_backup
andrah_autoload
listed in the Plugins tab. After this failed installation,rah_backup
was not activated. I know kids like me shouldn't be playing with this not-yet-stable tooIs in the toolshed, but I'm reporting just in case it helps.