Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove PHP template from CLI #4843

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/forty-islands-itch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@shopify/app': patch
shauns marked this conversation as resolved.
Show resolved Hide resolved
'@shopify/cli': patch
---

Remove PHP template from app creation options
5 changes: 1 addition & 4 deletions packages/app/src/cli/commands/app/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,7 @@
- Serving [GraphiQL for the Admin API](https://shopify.dev/docs/apps/tools/graphiql-admin-api#use-a-local-graphiql-instance) using your app's credentials and access scopes.
- Building and serving your app and app extensions.

If you're using the PHP or Ruby app template, then you need to complete the following steps before you can preview your app for the first time:

- PHP: [Set up your Laravel app](https://github.com/Shopify/shopify-app-template-php#setting-up-your-laravel-app)
- Ruby: [Set up your Rails app](https://github.com/Shopify/shopify-app-template-ruby#setting-up-your-rails-app)
If you're using the Ruby app template, then you need to complete the following steps outlined in the [README](https://github.com/Shopify/shopify-app-template-ruby#setting-up-your-rails-app) before you can preview your app for the first time.

> Caution: To use a development store or Plus sandbox store with Shopify CLI, you need to be the store owner, or have a [staff account](https://help.shopify.com/manual/your-account/staff-accounts) on the store. Staff accounts are created automatically the first time you access a development store with your Partner staff account through the Partner Dashboard.
`
Expand Down Expand Up @@ -152,7 +149,7 @@
if (flags['api-key']) {
await showApiKeyDeprecationWarning()
}
const apiKey = flags['client-id'] || flags['api-key']

Check warning on line 152 in packages/app/src/cli/commands/app/dev.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/app/src/cli/commands/app/dev.ts#L152

[@typescript-eslint/prefer-nullish-coalescing] Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.

await addPublicMetadata(() => ({
cmd_app_dependency_installation_skipped: flags['skip-dependencies-installation'],
Expand Down
4 changes: 0 additions & 4 deletions packages/app/src/cli/prompts/init/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,6 @@
url: 'https://github.com/Shopify/shopify-app-template-node',
visible: false,
} as Template,
php: {
url: 'https://github.com/Shopify/shopify-app-template-php',
visible: false,
} as Template,
ruby: {
url: 'https://github.com/Shopify/shopify-app-template-ruby',
visible: false,
Expand All @@ -80,7 +76,7 @@
template = await renderSelectPrompt({
choices: templateOptionsInOrder.map((key) => {
return {
label: templates[key].label || key,

Check warning on line 79 in packages/app/src/cli/prompts/init/init.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/app/src/cli/prompts/init/init.ts#L79

[@typescript-eslint/prefer-nullish-coalescing] Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.
value: key,
}
}),
Expand Down Expand Up @@ -121,7 +117,7 @@
selectedUrl = `${selectedUrl}#${branch}`
}

answers.template = selectedUrl || answers.template || defaults.template

Check warning on line 120 in packages/app/src/cli/prompts/init/init.ts

View workflow job for this annotation

GitHub Actions / ESLint Report Analysis

packages/app/src/cli/prompts/init/init.ts#L120

[@typescript-eslint/prefer-nullish-coalescing] Prefer using nullish coalescing operator (`??`) instead of a logical or (`||`), as it is a safer operator.

answers.globalCLIResult = await installGlobalCLIPrompt()

Expand Down
3 changes: 1 addition & 2 deletions packages/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ DESCRIPTION
and access scopes.
- Building and serving your app and app extensions.
If you're using the PHP or Ruby app template, then you need to complete the following steps before you can preview
If you're using the Ruby app template, then you need to complete the following steps before you can preview
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

QQ: Is this readme generated from somewhere? Seems to be from dev.ts

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is. I think CI checks will nudge you to do this but pnpm refresh-readme should do the job.

your app for the first time:
- PHP: "Set up your Laravel app" (https://github.com/Shopify/shopify-app-template-php#setting-up-your-laravel-app)
- Ruby: "Set up your Rails app" (https://github.com/Shopify/shopify-app-template-ruby#setting-up-your-rails-app)
> Caution: To use a development store or Plus sandbox store with Shopify CLI, you need to be the store owner, or have
Expand Down
Loading