Skip to content

Commit

Permalink
DDEV: command for local development (#4133)
Browse files Browse the repository at this point in the history
* Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)

* Rector: CQ - UnusedForeachValueToArrayKeysRector

See Rector\CodeQuality\Rector\Foreach_\UnusedForeachValueToArrayKeysRector

* fixes + phpstan

See fix at rector: rectorphp/rector-src#6164

* Revert "Rector: CQ - UnusedForeachValueToArrayKeysRector (#1)"

This reverts commit 3d7eaf6.

* DDEV localdev [skip ci]

* Typo [skip ci]

* Fix

* Changed path

---------

Co-authored-by: Ng Kiat Siong <[email protected]>
  • Loading branch information
sreichel and kiatng authored Sep 23, 2024
1 parent 6c5f04a commit d04c62e
Show file tree
Hide file tree
Showing 3 changed files with 606 additions and 1 deletion.
19 changes: 19 additions & 0 deletions .ddev/commands/web/localdev
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash

## Description: create local development directory
## Usage: localdev
## Example: ddev localdev <git-url>

if [ ! -d ".localdev/" ]
then
mkdir ".localdev/"
echo "Directory created."
fi

if ! grep -q "./.localdev/*" composer.json; then
php vendor/bin/composer config repositories.local '{"type": "path", "url": "./.localdev/*", "canonical": false}'
echo "Patched composer.json."
fi

cd ".localdev/" || exit
git clone "$@"
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
},
"require-dev": {
"ext-xmlreader": "*",
"composer/composer": "^2.7",
"dealerdirect/phpcodesniffer-composer-installer": "^1.0.0",
"friendsofphp/php-cs-fixer": "^3.4",
"macopedia/phpstan-magento1": "^1.0.5",
Expand Down
Loading

0 comments on commit d04c62e

Please sign in to comment.