generated from Shopify/shopify-app-template-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cd95f0e
Showing
110 changed files
with
4,598 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
web/vendor | ||
web/frontend/node_modules | ||
web/frontend/dist |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
* text=auto | ||
*.css linguist-vendored | ||
*.scss linguist-vendored | ||
*.js linguist-vendored | ||
CHANGELOG.md export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* @Shopify/learn-libs-superteam |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
--- | ||
name: '🐛 Bug Report' | ||
about: Something isn't working | ||
labels: "Type: Bug 🐛" | ||
--- | ||
|
||
# Issue summary | ||
|
||
Write a short description of the issue here ↓ | ||
|
||
|
||
## Expected behavior | ||
|
||
What do you think should happen? | ||
|
||
|
||
## Actual behavior | ||
|
||
What actually happens? | ||
|
||
Tip: include an error message (in a `<details></details>` tag) if your issue is related to an error | ||
|
||
|
||
## Steps to reproduce the problem | ||
|
||
1. | ||
1. | ||
1. | ||
|
||
## Reduced test case | ||
|
||
The best way to get your bug fixed is to provide a [reduced test case](https://developer.mozilla.org/en-US/docs/Mozilla/QA/Reducing_testcases). | ||
|
||
|
||
--- | ||
|
||
## Checklist | ||
|
||
- [ ] I have described this issue in a way that is actionable (if possible) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: '📈 Enhancement' | ||
about: Enhancement to our codebase that isn't a adding or changing a feature | ||
labels: "Type: Enhancement 📈" | ||
--- | ||
|
||
## Overview/summary | ||
|
||
... | ||
|
||
## Motivation | ||
|
||
> What inspired this enhancement? | ||
... | ||
|
||
### Area | ||
|
||
- [ ] Add any relevant `Area: <area>` labels to this issue | ||
|
||
|
||
--- | ||
|
||
## Checklist | ||
|
||
- [ ] I have described this enhancement in a way that is actionable (if possible) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
name: '🙌 Feature Request' | ||
about: Suggest a new feature, or changes to an existing one | ||
labels: "Type: Feature Request :raised_hands:" | ||
--- | ||
|
||
## Overview | ||
|
||
... | ||
|
||
## Type | ||
|
||
- [ ] New feature | ||
- [ ] Changes to existing features | ||
|
||
## Motivation | ||
|
||
> What inspired this feature request? What problems were you facing? | ||
... | ||
|
||
### Area | ||
|
||
- [ ] Add any relevant `Area: <area>` labels to this issue | ||
|
||
--- | ||
|
||
## Checklist | ||
|
||
- [ ] I have described this feature request in a way that is actionable (if possible) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<!-- | ||
☝️How to write a good PR title: | ||
- Prefix it with [Feature] (if applicable) | ||
- Start with a verb, for example: Add, Delete, Improve, Fix… | ||
- Give as much context as necessary and as little as possible | ||
- Prefix it with [WIP] while it’s a work in progress | ||
--> | ||
|
||
### WHY are these changes introduced? | ||
|
||
Fixes #0000 <!-- link to issue if one exists --> | ||
|
||
<!-- | ||
Context about the problem that’s being addressed. | ||
--> | ||
|
||
### WHAT is this pull request doing? | ||
|
||
<!-- | ||
Summary of the changes committed. | ||
Before / after screenshots appreciated for UI changes, if applicable. | ||
--> | ||
|
||
## Checklist | ||
|
||
**Note**: once this PR is merged, it becomes a new release for this template. | ||
|
||
- [ ] I have added/updated tests for this change | ||
- [ ] I have made changes to the `README.md` file and other related documentation, if applicable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
version: 2 | ||
updates: | ||
# Enable version updates for composer - main/web (new template) | ||
- package-ecosystem: composer | ||
directory: "/web" | ||
schedule: | ||
interval: "daily" | ||
time: "00:00" | ||
timezone: "UTC" | ||
# Raise PRs for composer updates against the `main` branch | ||
target-branch: "main" | ||
reviewers: | ||
- Shopify/client-libraries-atc | ||
labels: | ||
- "Composer upgrades" | ||
open-pull-requests-limit: 100 | ||
|
||
# Enable version updates for npm - main/ (new template) | ||
- package-ecosystem: "npm" | ||
# Look for `package.json` and `lock` files in the `root` directory | ||
# This will be CLI dependencies only | ||
directory: "/" | ||
# Check the npm registry for updates every day (weekdays) | ||
schedule: | ||
interval: "daily" | ||
time: "00:00" | ||
timezone: "UTC" | ||
# Raise PRs for version updates to npm against the `main` branch | ||
target-branch: "main" | ||
reviewers: | ||
- Shopify/client-libraries-atc | ||
# Labels on pull requests for version updates only | ||
labels: | ||
- "npm dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: [push, pull_request] | ||
name: CI | ||
jobs: | ||
CI: | ||
runs-on: ubuntu-latest | ||
env: | ||
PHP_INI_VALUES: assert.exception=1, zend.assertions=1 | ||
SHOPIFY_API_KEY: test-api-key | ||
SHOPIFY_API_SECRET: test-secret-key | ||
SCOPES: read_products,write_products | ||
HOST: app-host-name.com | ||
APP_ENV: local | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php-version: | ||
- "8.0" | ||
- "8.1" | ||
- "8.2" | ||
defaults: | ||
run: | ||
working-directory: ./web | ||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Find any lock file | ||
run: if test -f ../yarn.lock || test -f ../pnpm-lock.yaml || test -f ../package-lock.json; then echo "Please don't commit lock files" && exit 1; fi | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
tools: composer:v2, phpcs | ||
ini-values: ${{ env.PHP_INI_VALUES }} | ||
|
||
- name: Install dependencies with composer | ||
run: composer update --no-ansi --no-interaction --no-progress | ||
|
||
- name: Run linter | ||
run: composer lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Contributor License Agreement (CLA) | ||
|
||
on: | ||
pull_request_target: | ||
types: [opened, synchronize] | ||
issue_comment: | ||
types: [created] | ||
|
||
jobs: | ||
cla: | ||
runs-on: ubuntu-latest | ||
if: | | ||
(github.event.issue.pull_request | ||
&& !github.event.issue.pull_request.merged_at | ||
&& contains(github.event.comment.body, 'signed') | ||
) | ||
|| (github.event.pull_request && !github.event.pull_request.merged) | ||
steps: | ||
- uses: Shopify/shopify-cla-action@v1 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
cla-token: ${{ secrets.CLA_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/web/frontend/node_modules | ||
/web/public/hot | ||
/web/public/storage | ||
/web/storage/*.key | ||
/web/storage/db.sqlite | ||
/web/vendor | ||
/web/composer.lock | ||
.env | ||
.env.* | ||
!.env.example | ||
!.env.testing | ||
web/.phpunit.result.cache | ||
docker-compose.override.yml | ||
Homestead.json | ||
Homestead.yaml | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
**/node_modules | ||
|
||
.idea | ||
.vscode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "web/frontend"] | ||
path = web/frontend | ||
url = https://github.com/Shopify/shopify-frontend-template-react |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
engine-strict=true | ||
auto-install-peers=true | ||
shamefully-hoist=true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
php: | ||
preset: laravel | ||
disabled: | ||
- no_unused_imports | ||
finder: | ||
not-name: | ||
- index.php | ||
- server.php | ||
css: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"recommendations": [ | ||
"shopify.polaris-for-vscode" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
FROM php:8.1-fpm-alpine | ||
|
||
ARG SHOPIFY_API_KEY | ||
ENV SHOPIFY_API_KEY=$SHOPIFY_API_KEY | ||
|
||
RUN apk update && apk add --update nodejs npm \ | ||
composer php-pdo_sqlite php-pdo_mysql php-pdo_pgsql php-simplexml php-fileinfo php-dom php-tokenizer php-xml php-xmlwriter php-session \ | ||
openrc bash nginx | ||
|
||
RUN docker-php-ext-install pdo | ||
|
||
COPY --chown=www-data:www-data web /app | ||
WORKDIR /app | ||
|
||
# Overwrite default nginx config | ||
COPY web/nginx.conf /etc/nginx/nginx.conf | ||
|
||
# Use the default production configuration | ||
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini" | ||
|
||
RUN composer install | ||
RUN touch /app/storage/db.sqlite | ||
RUN chown www-data:www-data /app/storage/db.sqlite | ||
|
||
RUN cd frontend && npm install && npm run build | ||
RUN composer build | ||
|
||
ENTRYPOINT [ "/app/entrypoint.sh" ] |
Oops, something went wrong.