CiviCRM Asset Plugin merge requestshttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests2023-11-07T02:08:43Zhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/11Include json files in being synced2023-11-07T02:08:43ZseamusleeInclude json files in being syncedTo support https://github.com/civicrm/civicrm-core/pull/28033 we need to allow for syncing of json files into libraries folder
ping @totten @colemanwTo support https://github.com/civicrm/civicrm-core/pull/28033 we need to allow for syncing of json files into libraries folder
ping @totten @colemanwtottentottenhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/10CKEditor options can't be set2023-11-12T14:42:06ZJonGoldCKEditor options can't be setDrupal 8+ doesn't allow you to set advanced CKEditor options (under "Display Preferences"). It's looking for a `.json` file that isn't copied into the `libraries` folder.
#### Before
![Selection_1924](/uploads/90b1748f53f9d404f6fa519...Drupal 8+ doesn't allow you to set advanced CKEditor options (under "Display Preferences"). It's looking for a `.json` file that isn't copied into the `libraries` folder.
#### Before
![Selection_1924](/uploads/90b1748f53f9d404f6fa519d299ff350/Selection_1924.png)
#### After
![Selection_1923](/uploads/f5e710be77120cdf3b2f13e07c5cb573/Selection_1923.png)JonGoldJonGoldhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/9Updated CivicrmPublishCommand.php to fix TypeError2022-05-18T23:35:12ZwouterhUpdated CivicrmPublishCommand.php to fix TypeErrorUpdated CivicrmPublishCommand.php to fix TypeError: Return value of "Civi\AssetPlugin\Command\CivicrmPublishCommand::execute()" must be of the type int, "null" returned.Updated CivicrmPublishCommand.php to fix TypeError: Return value of "Civi\AssetPlugin\Command\CivicrmPublishCommand::execute()" must be of the type int, "null" returned.https://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/8dev/civicrm-asset-plugin#21 - Satisfy symfony 5 used in composer v2.32022-06-10T20:35:29ZDaveDdev/civicrm-asset-plugin#21 - Satisfy symfony 5 used in composer v2.3See https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/21
This should still work with composer <2.3 since the old symfony also allows returning 0: https://github.com/symfony/console/blob/v2.8.52/Command/Command.php#L143See https://lab.civicrm.org/dev/civicrm-asset-plugin/-/issues/21
This should still work with composer <2.3 since the old symfony also allows returning 0: https://github.com/symfony/console/blob/v2.8.52/Command/Command.php#L143https://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/7Include .map files by default in the sync2020-11-23T23:00:45ZseamusleeInclude .map files by default in the syncThis ensures that .map files that are loaded by browser dev consoles are included in the sync
@tottenThis ensures that .map files that are loaded by browser dev consoles are included in the sync
@tottenhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/6Degrade gracefully during conflict or removal2020-10-08T01:31:54ZtottenDegrade gracefully during conflict or removalThis addresses two issues, but they touch the same code and work in similar ways, so it's hard to split them apart. The issues:
1. __Soft Package Conflict__: Following [civicrm-drupal-8#49](https://github.com/civicrm/civicrm-drupal-8/pu...This addresses two issues, but they touch the same code and work in similar ways, so it's hard to split them apart. The issues:
1. __Soft Package Conflict__: Following [civicrm-drupal-8#49](https://github.com/civicrm/civicrm-drupal-8/pull/49) in v5.31+, there is a possibility that early D8 deployments will have both `roundearth/civicrm-composer-plugin` (b/c that was how earlier templates worked) and `civicrm/civicrm-asset-plugin` (b/c that'll be added during an upgrade to 5.31). But these aren't designed to work together. Instead, we should show a warning.
2. __Uninstall__: If you remove this plugin (in composer v1), the main plugin-class and event-listeners remain momentarily active. But they're not usable (e.g. the class-loader goes away). So we need to take extra measures to avoid ugly errors during uninstallation.https://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/5Ensure that asset-plugin sync's assets after compile-plugin has a chance to b...2020-10-01T01:15:33ZtottenEnsure that asset-plugin sync's assets after compile-plugin has a chance to buildhttps://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/4Update to support composer-plugin-api v22020-12-04T02:23:28ZtottenUpdate to support composer-plugin-api v2This adds support(*) for the upcoming composer v2.
Background:
* https://github.com/composer/composer/issues/8726
* https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors
* https://lab.civicr...This adds support(*) for the upcoming composer v2.
Background:
* https://github.com/composer/composer/issues/8726
* https://github.com/composer/composer/blob/master/UPGRADE-2.0.md#for-integrators-and-plugin-authors
* https://lab.civicrm.org/dev/core/-/issues/2015
The question is whether this works. I *believe* it does, but the test suite results are mixed:
* Both `tests/Integration/CustomPathsTest.php` and `tests/Integration/DefaultPathsTest.php` pass.
* There's an issue with `tests/Integration/LifecycleTest.php`, but this patch - and the composer version - don't seem relevant. The tests passes on my Macbook but not my Linux box.
```
1) Civi\AssetPlugin\Integration\LifecycleTest::testFileModes
readlink(): No such file or directory
/home/totten/src/civicrm-asset-plugin/tests/Integration/IntegrationTestCase.php:122
/home/totten/src/civicrm-asset-plugin/tests/Integration/LifecycleTest.php:50
```
* `tests/Integration/DrupalProjectPathsTest.php` has failures. I believe the problem is that *other* plugins (ie `drupal-scaffold`) are not yet compatible.
```
Your requirements could not be resolved to an installable set of packages.
Problem 1
- drupal-composer/drupal-scaffold[2.5.0, ..., 2.6.1] require composer-plugin-api ^1.0.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
- Root composer.json requires drupal-composer/drupal-scaffold ^2.5 -> satisfiable by drupal-composer/drupal-scaffold[2.5.0, ..., 2.6.1].
You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-req=composer-plugin-api, but this may result in broken plugins and bigger problems down the line.
```
So I guess the question is whether there's any downside to asserting that `civicrm-asset-plugin` is v2-compatible when we can't yet do a realistic E2E test.https://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/3Address Array and string offset access syntax with curly braces is deprecated2020-08-11T19:36:59ZKarinGAddress Array and string offset access syntax with curly braces is deprecatedNo more deprecation warnings after this!No more deprecation warnings after this!https://lab.civicrm.org/dev/civicrm-asset-plugin/-/merge_requests/2dev/core#1643 - Prevent broken paths on windows during civicrm-setup2020-03-20T22:55:34ZDaveDdev/core#1643 - Prevent broken paths on windows during civicrm-setuphttps://lab.civicrm.org/dev/core/issues/1643#note_33044
On windows the `vendor/composer/autoload_civicrm_asset.php` file gets created with paths like:
`$civicrm_paths['civicrm.root']['path'] = $baseDir . '/C:\\path\\to\\vendor/civicrm/...https://lab.civicrm.org/dev/core/issues/1643#note_33044
On windows the `vendor/composer/autoload_civicrm_asset.php` file gets created with paths like:
`$civicrm_paths['civicrm.root']['path'] = $baseDir . '/C:\\path\\to\\vendor/civicrm/civicrm-core/';`
This fixes it so it doesn't do that. After the patch it's possible to install Drupal 8 on windows using `cv core:install` (although you still at the moment need the hack mentioned in the first part of the ticket in CRM/Core/CodeGen/Util/Xml.php).