-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(php): Install php-cs-fixer in Dockerfile (#4607)
- Loading branch information
Showing
3 changed files
with
29 additions
and
2 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,9 @@ | ||
<?php | ||
|
||
class RawClient | ||
{ | ||
public function __construct() | ||
{ | ||
// TODO: Implement me! | ||
} | ||
} |
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 |
---|---|---|
@@ -1,9 +1,18 @@ | ||
FROM node:18-alpine3.18 | ||
FROM node:18-alpine3.18 AS node | ||
FROM composer:2.7.9 | ||
|
||
RUN apk --no-cache add bash curl git zip && git config --global user.name "fern" && git config --global user.email "[email protected]" | ||
|
||
RUN composer global require friendsofphp/php-cs-fixer | ||
ENV PATH="$PATH:/root/.composer/vendor/bin" | ||
ENV YARN_CACHE_FOLDER=/.yarn | ||
|
||
COPY generators/php/model/dist /dist | ||
|
||
# Copy over node contents to be able to run the compiled CLI | ||
COPY --from=node /usr/local/bin/node /usr/local/bin/ | ||
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ | ||
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx | ||
|
||
ENTRYPOINT ["node", "/dist/cli.cjs"] |
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 |
---|---|---|
@@ -1,10 +1,19 @@ | ||
FROM node:18-alpine3.18 | ||
FROM node:18-alpine3.18 AS node | ||
FROM composer:2.7.9 | ||
|
||
RUN apk --no-cache add bash curl git zip && git config --global user.name "fern" && git config --global user.email "[email protected]" | ||
|
||
RUN composer global require friendsofphp/php-cs-fixer | ||
ENV PATH="$PATH:/root/.composer/vendor/bin" | ||
ENV YARN_CACHE_FOLDER=/.yarn | ||
|
||
COPY generators/php/sdk/dist /dist | ||
COPY generators/php/sdk/features.yml /assets/features.yml | ||
|
||
# Copy over node contents to be able to run the compiled CLI | ||
COPY --from=node /usr/local/bin/node /usr/local/bin/ | ||
COPY --from=node /usr/local/lib/node_modules /usr/local/lib/node_modules | ||
RUN ln -s ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ | ||
&& ln -s ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx | ||
|
||
ENTRYPOINT ["node", "/dist/cli.cjs"] |