Skip to content

Commit

Permalink
Adiciona suporte ao frankenphp
Browse files Browse the repository at this point in the history
  • Loading branch information
lpirola committed Jun 15, 2024
1 parent a5c9b73 commit 62d1522
Show file tree
Hide file tree
Showing 3,153 changed files with 15,178 additions and 4,916 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
61 changes: 61 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# EditorConfig helps developers define and maintain consistent
# coding styles between different editors and IDEs
# editorconfig.org

root = true

[*]
# Change these settings to your own preference
indent_style = space
indent_size = 4

# We recommend you to keep these unchanged
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{js,html,ts,tsx}]
indent_size = 2

[*.json]
indent_size = 2

[*.md]
trim_trailing_whitespace = false

[*.sh]
indent_style = tab

[*.xml{,.dist}]
indent_style = space
indent_size = 4

[*.{yaml,yml}]
trim_trailing_whitespace = false

[helm/api-platform/**.yaml]
indent_size = 2

[.github/workflows/*.yml]
indent_size = 2

[.gitmodules]
indent_style = tab

[.php_cs{,.dist}]
indent_style = space
indent_size = 4

[composer.json]
indent_size = 4

[{,docker-}compose{,.*}.{yaml,yml}]
indent_style = space
indent_size = 2

[{,*.*}Dockerfile]
indent_style = tab

[{,*.*}Caddyfile]
indent_style = tab
20 changes: 20 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
* text=auto eol=lf

*.conf text eol=lf
*.html text eol=lf
*.ini text eol=lf
*.js text eol=lf
*.json text eol=lf
*.md text eol=lf
*.php text eol=lf
*.sh text eol=lf
*.yaml text eol=lf
*.yml text eol=lf
bin/console text eol=lf
composer.lock text eol=lf merge=ours
pnpm-lock.yaml text eol=lf merge=ours

*.ico binary
*.png binary

update-deps.sh export-ignore
102 changes: 102 additions & 0 deletions .github/workflows/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
# Contributing to API Platform

First, thank you for contributing, you're awesome!

To have your code integrated in the API Platform project, there are some rules to follow, but don't panic, it's easy!

## Reporting Bugs

If you happen to find a bug, we kindly request you to report it. However, before submitting it, please:

* Check the [project documentation available online](https://api-platform.com/docs/)

Then, if it appears that it's a real bug, you may report it using Github by following these 3 points:

* Check if the bug is not already reported!
* A clear title to resume the issue
* A description of the workflow needed to reproduce the bug,

> _NOTE:_ Don’t hesitate to give as much information as you can (OS, PHP version extensions...)
## Pull Requests

### Writing a Pull Request

You should base your changes on the `main` branch.

### Matching Coding Standards

The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html).
But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](http://cs.sensiolabs.org/) tool:

```bash
php-cs-fixer.phar fix
```

And then, add fixed file to your commit before push.
Be sure to add only **your modified files**. If another files are fixed by cs tools, just revert it before commit.

### Sending a Pull Request

When you send a PR, just make sure that:

* You add valid test cases.
* Tests are green.
* You make a PR on the related documentation in the [api-platform/docs](https://github.com/api-platform/docs) repository.
* You make the PR on the same branch you based your changes on. If you see commits
that you did not make in your PR, you're doing it wrong.
* Also don't forget to add a comment when you update a PR with a ping to [the maintainers](https://github.com/orgs/api-platform/people),
so he/she will get a notification.
* Squash your commits into one commit. (see the next chapter)

Fill in the following header from the pull request template:

```markdown
| Q | A
| ------------- | ---
| Bug fix? | yes/no
| New feature? | yes/no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #1234, #5678
| License | MIT
| Doc PR | api-platform/docs#1234
```

## Squash your Commits

If you have 3 commits. So start with:

```bash
git rebase -i HEAD~3
```

An editor will be opened with your 3 commits, all prefixed by `pick`.

Replace all `pick` prefixes by `fixup` (or `f`) **except the first commit** of the list.

Save and quit the editor.

After that, all your commits where squashed into the first one and the commit message of the first commit.

If you would like to rename your commit message type:

```bash
git commit --amend
```

Now force push to update your PR:

```bash
git push --force
```

# License and Copyright Attribution

When you open a Pull Request to the API Platform project, you agree to license your code under the [MIT license](../LICENSE)
and to transfer the copyright on the submitted code to [Kévin Dunglas](https://github.com/dunglas).

Be sure to you have the right to do that (if you are a professional, ask your company)!

If you include code from another project, please mention it in the Pull Request description and credit the original author.
22 changes: 22 additions & 0 deletions .github/workflows/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: 2

updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: github-actions
directory: /
schedule:
interval: monthly
- package-ecosystem: composer
directory: /api
schedule:
interval: daily
labels:
- dependencies
open-pull-requests-limit: 0 # open Pull Requests for security updates only
- package-ecosystem: npm
directory: /pwa
schedule:
interval: daily
labels:
- dependencies
open-pull-requests-limit: 0 # open Pull Requests for security updates only
73 changes: 73 additions & 0 deletions .github/workflows/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: CI

on:
push:
branches:
- main
pull_request: ~
workflow_dispatch: ~

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build Docker images
uses: docker/bake-action@v4
with:
pull: true
load: true
files: |
compose.yaml
compose.override.yaml
set: |
*.cache-from=type=gha,scope=${{github.ref}}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{github.ref}},mode=max
-
name: Start services
run: docker compose up --wait --no-build
-
name: Check HTTP reachability
run: curl -v --fail-with-body http://localhost
-
name: Check API reachability
run: curl -vk --fail-with-body https://localhost
-
name: Check PWA reachability
run: "curl -vk --fail-with-body -H 'Accept: text/html' https://localhost"
-
name: Create test database
run: docker compose exec -T php bin/console -e test doctrine:database:create
-
name: Run migrations
run: docker compose exec -T php bin/console -e test doctrine:migrations:migrate --no-interaction
-
name: Run PHPUnit
run: docker compose exec -T php bin/phpunit
-
name: Doctrine Schema Validator
run: docker compose exec -T php bin/console -e test doctrine:schema:validate
lint:
name: Docker Lint
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Lint Dockerfiles
uses: hadolint/[email protected]
with:
recursive: true
51 changes: 51 additions & 0 deletions .github/workflows/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Release
permissions:
contents: write
pull-requests: write

on:
workflow_dispatch:
inputs:
tag:
description: 'API Platform core tag'
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
tests:
name: Update api-platform/core
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Build Docker images
uses: docker/bake-action@v4
with:
pull: true
load: true
files: |
compose.yaml
compose.override.yaml
set: |
*.cache-from=type=gha,scope=${{github.ref}}
*.cache-from=type=gha,scope=refs/heads/main
*.cache-to=type=gha,scope=${{github.ref}},mode=max
-
name: Update API Platform
run: docker compose run php composer update api-platform/core:${{ inputs.tag }}
-
name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'chore: api-platform ${{ inputs.tag }}'
branch: api-platform-core
title: 'chore: api-platform ${{ inputs.tag }}'
body: 'Updates api-platform/core to ${{ inputs.tag }}'
19 changes: 3 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
vendor
var
public/router.php
vendor
src/modules/Components/assets/js/media-query.js
src/modules/Components/assets/js/media-query/
node_modules
mix-manifest.json
.pnpm-store
dev/docker-data/
src/themes/BaseV1/assets/css/main.css
src/themes/BaseV1/assets/css/main.css.map
.idea
.phpunit.result.cache
.php-cs-fixer.cache
docker-data
/.env
/helm/api-platform/charts/*
!/helm/api-platform/charts/.gitignore
14 changes: 7 additions & 7 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[submodule "src/plugins/MultipleLocalAuth"]
path = src/plugins/MultipleLocalAuth
url = https://github.com/mapasculturais/plugin-MultipleLocalAuth
branch = master
[submodule "src/themes/MapasCE"]
path = src/themes/MapasCE
url = https://github.com/secultce/theme-MapasCE
[submodule "api/mapas/src/plugins/plugin-Metabase"]
path = api/mapas/src/plugins/plugin-Metabase
url = https://github.com/RedeMapas/plugin-Metabase
branch = main
[submodule "api/mapas/src/plugins/plugin-MultipleLocalAuth"]
path = api/mapas/src/plugins/plugin-MultipleLocalAuth
url = https://github.com/RedeMapas/plugin-MultipleLocalAuth
branch = main
Loading

0 comments on commit 62d1522

Please sign in to comment.