Skip to content

Commit 268e816

Browse files
committed
feat: Adiciona configuração do GitHub Token e ajustes no composer.json para desenvolvimento local
1 parent 7331589 commit 268e816

File tree

3 files changed

+35
-3
lines changed

3 files changed

+35
-3
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ jobs:
3333
restore-keys: |
3434
${{ runner.os }}-php-${{ matrix.php-version }}-
3535
36+
- name: Setup GitHub Token for Composer
37+
run: composer config --global github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Replace local path with GitHub repository
40+
run: |
41+
sed -i 's|"type": "path"|"type": "vcs"|' composer.json
42+
sed -i 's|"url": "../pivotphp-core"|"url": "https://github.com/${{ github.repository_owner }}/pivotphp-core"|' composer.json
43+
sed -i 's|"pivotphp/core": "\*@dev"|"pivotphp/core": "dev-main"|' composer.json
44+
45+
- name: Debug composer.json
46+
run: cat composer.json
47+
3648
- name: Install dependencies
3749
run: composer install --prefer-dist --no-progress --no-interaction
3850

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,26 @@ Robust and well-tested Cycle ORM integration for PivotPHP microframework
2828
composer require pivotphp/cycle-orm
2929
```
3030

31+
### Development Setup
32+
33+
When developing locally with both pivotphp-core and pivotphp-cycle-orm:
34+
35+
1. Clone both repositories in the same parent directory:
36+
```bash
37+
git clone https://github.com/CAFernandes/pivotphp-core.git
38+
git clone https://github.com/CAFernandes/pivotphp-cycle-orm.git
39+
```
40+
41+
2. Install dependencies:
42+
```bash
43+
cd pivotphp-cycle-orm
44+
composer install
45+
```
46+
47+
The `composer.json` is configured to use the local path `../pivotphp-core` for development.
48+
49+
**Note**: The CI/CD pipeline automatically adjusts the composer configuration to use the GitHub repository instead of the local path.
50+
3151
## 🔧 Quick Start
3252

3353
### 1. Register the Service Provider

docs/integration/helixphp-cycle-orm.md renamed to docs/integration/pivotphp-cycle-orm.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ No `config/app.php`, adicione o provider:
8888
```php
8989
return [
9090
'providers' => [
91-
Helix\CycleORM\CycleServiceProvider::class,
91+
PivotPHP\CycleORM\CycleServiceProvider::class,
9292
],
9393
];
9494
```
@@ -230,11 +230,11 @@ $app->run();
230230

231231
## Links Úteis
232232

233-
- [PivotPHP](https://github.com/PivotPHP/helix-core)
233+
- [PivotPHP](https://github.com/PivotPHP/pivotphp-core)
234234
- [Cycle ORM](https://cycle-orm.dev/docs/intro/2.x/en)
235235
- [Cycle ORM Annotations](https://cycle-orm.dev/docs/annotated/2.x/en)
236236
- [Cycle ORM Migrations](https://cycle-orm.dev/docs/migrations/2.x/en)
237-
- [Exemplo de projeto PivotPHP + Cycle ORM](https://github.com/PivotPHP/helix-core-cycle-orm-extension)
237+
- [Exemplo de projeto PivotPHP + Cycle ORM](https://github.com/PivotPHP/pivotphp-cycle-orm)
238238

239239
---
240240

0 commit comments

Comments
 (0)