├── .github ├── .patch_files ├── .syncignore ├── CODEOWNERS ├── dependabot.yml ├── labels.yml └── workflows │ ├── approve-bot-pr.yml │ ├── create-draft-release.yml │ ├── label-pr.yml │ ├── lint-yaml.yml │ ├── lint.yml │ ├── publish-releases.yml │ ├── push-buildpackage.yml │ ├── synchronize-labels.yml │ ├── test-pull-request.yml │ ├── update-buildpack-toml.yml │ ├── update-github-config.yml │ └── update-go-mod-version.yml ├── .gitignore ├── LICENSE ├── NOTICE ├── README.md ├── buildpack.toml ├── go.mod ├── go.sum ├── integration.json ├── integration ├── builtin_server_test.go ├── composer_test.go ├── httpd_test.go ├── init_test.go ├── memcached_session_handler_test.go ├── nginx_test.go ├── redis_session_handler_test.go ├── reproducible_builds_test.go ├── stack_upgrade_test.go └── testdata │ ├── ca_cert_apps │ ├── binding │ │ ├── ca.pem │ │ └── type │ ├── httpd_app │ │ ├── .httpd.conf.d │ │ │ └── custom.conf │ │ ├── certs │ │ │ ├── ca.pem │ │ │ ├── cert.pem │ │ │ └── key.pem │ │ └── htdocs │ │ │ └── index.php │ └── nginx_app │ │ ├── .nginx.conf.d │ │ └── user-server.conf │ │ ├── certs │ │ ├── ca.pem │ │ ├── cert.pem │ │ └── key.pem │ │ └── htdocs │ │ └── index.php │ ├── session_handler_apps │ ├── htdocs │ │ └── index.php │ ├── memcached_binding │ │ └── type │ └── redis_binding │ │ └── type │ ├── simple_composer_app │ ├── README.md │ ├── composer.json │ ├── composer.lock │ └── htdocs │ │ └── index.php │ └── vendored_composer_app │ ├── composer.json │ ├── composer.lock │ ├── htdocs │ └── index.php │ └── vendor │ ├── autoload.php │ ├── composer │ ├── ClassLoader.php │ ├── LICENSE │ ├── autoload_classmap.php │ ├── autoload_namespaces.php │ ├── autoload_psr4.php │ ├── autoload_real.php │ ├── autoload_static.php │ └── installed.json │ ├── monolog │ └── monolog │ │ ├── CHANGELOG.md │ │ ├── LICENSE │ │ ├── README.md │ │ ├── composer.json │ │ └── src │ │ └── Monolog │ │ ├── ErrorHandler.php │ │ ├── Formatter │ │ ├── ChromePHPFormatter.php │ │ ├── ElasticaFormatter.php │ │ ├── FlowdockFormatter.php │ │ ├── FluentdFormatter.php │ │ ├── FormatterInterface.php │ │ ├── GelfMessageFormatter.php │ │ ├── HtmlFormatter.php │ │ ├── JsonFormatter.php │ │ ├── LineFormatter.php │ │ ├── LogglyFormatter.php │ │ ├── LogstashFormatter.php │ │ ├── MongoDBFormatter.php │ │ ├── NormalizerFormatter.php │ │ ├── ScalarFormatter.php │ │ └── WildfireFormatter.php │ │ ├── Handler │ │ ├── AbstractHandler.php │ │ ├── AbstractProcessingHandler.php │ │ ├── AbstractSyslogHandler.php │ │ ├── AmqpHandler.php │ │ ├── BrowserConsoleHandler.php │ │ ├── BufferHandler.php │ │ ├── ChromePHPHandler.php │ │ ├── CouchDBHandler.php │ │ ├── CubeHandler.php │ │ ├── Curl │ │ │ └── Util.php │ │ ├── DeduplicationHandler.php │ │ ├── DoctrineCouchDBHandler.php │ │ ├── DynamoDbHandler.php │ │ ├── ElasticSearchHandler.php │ │ ├── ErrorLogHandler.php │ │ ├── FilterHandler.php │ │ ├── FingersCrossed │ │ │ ├── ActivationStrategyInterface.php │ │ │ ├── ChannelLevelActivationStrategy.php │ │ │ └── ErrorLevelActivationStrategy.php │ │ ├── FingersCrossedHandler.php │ │ ├── FirePHPHandler.php │ │ ├── FleepHookHandler.php │ │ ├── FlowdockHandler.php │ │ ├── FormattableHandlerInterface.php │ │ ├── FormattableHandlerTrait.php │ │ ├── GelfHandler.php │ │ ├── GroupHandler.php │ │ ├── HandlerInterface.php │ │ ├── HandlerWrapper.php │ │ ├── HipChatHandler.php │ │ ├── IFTTTHandler.php │ │ ├── InsightOpsHandler.php │ │ ├── LogEntriesHandler.php │ │ ├── LogglyHandler.php │ │ ├── MailHandler.php │ │ ├── MandrillHandler.php │ │ ├── MissingExtensionException.php │ │ ├── MongoDBHandler.php │ │ ├── NativeMailerHandler.php │ │ ├── NewRelicHandler.php │ │ ├── NullHandler.php │ │ ├── PHPConsoleHandler.php │ │ ├── ProcessableHandlerInterface.php │ │ ├── ProcessableHandlerTrait.php │ │ ├── PsrHandler.php │ │ ├── PushoverHandler.php │ │ ├── RavenHandler.php │ │ ├── RedisHandler.php │ │ ├── RollbarHandler.php │ │ ├── RotatingFileHandler.php │ │ ├── SamplingHandler.php │ │ ├── Slack │ │ │ └── SlackRecord.php │ │ ├── SlackHandler.php │ │ ├── SlackWebhookHandler.php │ │ ├── SlackbotHandler.php │ │ ├── SocketHandler.php │ │ ├── StreamHandler.php │ │ ├── SwiftMailerHandler.php │ │ ├── SyslogHandler.php │ │ ├── SyslogUdp │ │ │ └── UdpSocket.php │ │ ├── SyslogUdpHandler.php │ │ ├── TestHandler.php │ │ ├── WhatFailureGroupHandler.php │ │ └── ZendMonitorHandler.php │ │ ├── Logger.php │ │ ├── Processor │ │ ├── GitProcessor.php │ │ ├── IntrospectionProcessor.php │ │ ├── MemoryPeakUsageProcessor.php │ │ ├── MemoryProcessor.php │ │ ├── MemoryUsageProcessor.php │ │ ├── MercurialProcessor.php │ │ ├── ProcessIdProcessor.php │ │ ├── ProcessorInterface.php │ │ ├── PsrLogMessageProcessor.php │ │ ├── TagProcessor.php │ │ ├── UidProcessor.php │ │ └── WebProcessor.php │ │ ├── Registry.php │ │ ├── ResettableInterface.php │ │ ├── SignalHandler.php │ │ └── Utils.php │ └── psr │ └── log │ ├── .gitignore │ ├── LICENSE │ ├── Psr │ └── Log │ │ ├── AbstractLogger.php │ │ ├── InvalidArgumentException.php │ │ ├── LogLevel.php │ │ ├── LoggerAwareInterface.php │ │ ├── LoggerAwareTrait.php │ │ ├── LoggerInterface.php │ │ ├── LoggerTrait.php │ │ ├── NullLogger.php │ │ └── Test │ │ ├── LoggerInterfaceTest.php │ │ └── TestLogger.php │ ├── README.md │ └── composer.json ├── package.toml ├── rfcs └── 0001-restructure.md └── scripts ├── .util ├── builders.sh ├── print.sh ├── tools.json └── tools.sh ├── integration.sh └── package.sh /.github/.patch_files: -------------------------------------------------------------------------------- 1 | .github/.patch_files 2 | .github/.syncignore 3 | .github/CODEOWNERS 4 | .github/dependabot.yml 5 | .github/labels.yml 6 | .github/workflows/approve-bot-pr.yml 7 | .github/workflows/label-pr.yml 8 | .github/workflows/lint-yaml.yml 9 | .github/workflows/lint.yml 10 | .github/workflows/synchronize-labels.yml 11 | .github/workflows/test-pull-request.yml 12 | .github/workflows/update-buildpack-toml.yml 13 | .github/workflows/update-github-config.yml 14 | .gitignore 15 | LICENSE 16 | NOTICE 17 | README.md 18 | scripts/.util/builders.sh 19 | scripts/.util/print.sh 20 | scripts/.util/tools.json 21 | scripts/.util/tools.sh 22 | scripts/integration.sh 23 | -------------------------------------------------------------------------------- /.github/.syncignore: -------------------------------------------------------------------------------- 1 | CODEOWNERS 2 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @paketo-buildpacks/php-maintainers 2 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | --- 2 | version: 2 3 | updates: 4 | - package-ecosystem: gomod 5 | directory: "/" 6 | schedule: 7 | interval: daily 8 | allow: 9 | # Allow both direct and indirect updates for all packages 10 | - dependency-type: "all" 11 | # group all minor and patch dependency updates together 12 | groups: 13 | go-modules: 14 | patterns: 15 | - "*" 16 | update-types: 17 | - "minor" 18 | - "patch" 19 | exclude-patterns: 20 | - "github.com/anchore/stereoscope" 21 | - "github.com/testcontainers/testcontainers-go" 22 | - "github.com/docker/docker" 23 | - "github.com/containerd/containerd" 24 | -------------------------------------------------------------------------------- /.github/labels.yml: -------------------------------------------------------------------------------- 1 | - name: status/possible-priority 2 | description: This issue is ready to work and should be considered as a potential priority 3 | color: F9D0C4 4 | - name: status/prioritized 5 | description: This issue has been triaged and resolving it is a priority 6 | color: BFD4F2 7 | - name: status/blocked 8 | description: This issue has been triaged and resolving it is blocked on some other issue 9 | color: 848978 10 | - name: bug 11 | description: Something isn't working 12 | color: d73a4a 13 | - name: enhancement 14 | description: A new feature or request 15 | color: a2eeef 16 | - name: documentation 17 | description: This issue relates to writing documentation 18 | color: D4C5F9 19 | - name: help wanted 20 | description: Extra attention is needed 21 | color: 008672 22 | - name: semver:major 23 | description: A change requiring a major version bump 24 | color: 6b230e 25 | - name: semver:minor 26 | description: A change requiring a minor version bump 27 | color: cc6749 28 | - name: semver:patch 29 | description: A change requiring a patch version bump 30 | color: f9d0c4 31 | - name: good first issue 32 | description: A good first issue to get started with 33 | color: d3fc03 34 | - name: "failure:release" 35 | description: An issue filed automatically when a release workflow run fails 36 | color: f00a0a 37 | - name: "failure:push" 38 | description: An issue filed automatically when a push buildpackage workflow run fails 39 | color: f00a0a 40 | - name: "failure:update-buildpack-toml" 41 | description: An issue filed automatically when a buildpack.toml update workflow run fails 42 | color: f00a0a 43 | - name: "failure:update-github-config" 44 | description: An issue filed automatically when a github config update workflow run fails 45 | color: f00a0a 46 | - name: "failure:approve-bot-pr" 47 | description: An issue filed automatically when a PR auto-approve workflow run fails 48 | color: f00a0a 49 | -------------------------------------------------------------------------------- /.github/workflows/approve-bot-pr.yml: -------------------------------------------------------------------------------- 1 | name: Approve Bot PRs and Enable Auto-Merge 2 | 3 | on: 4 | workflow_run: 5 | workflows: ["Test Pull Request"] 6 | types: 7 | - completed 8 | 9 | jobs: 10 | download: 11 | name: Download PR Artifact 12 | if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} 13 | runs-on: ubuntu-22.04 14 | outputs: 15 | pr-author: ${{ steps.pr-data.outputs.author }} 16 | pr-number: ${{ steps.pr-data.outputs.number }} 17 | steps: 18 | - name: 'Download artifact' 19 | uses: paketo-buildpacks/github-config/actions/pull-request/download-artifact@main 20 | with: 21 | name: "event-payload" 22 | repo: ${{ github.repository }} 23 | run_id: ${{ github.event.workflow_run.id }} 24 | workspace: "/github/workspace" 25 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 26 | - id: pr-data 27 | run: | 28 | echo "author=$(cat event.json | jq -r '.pull_request.user.login')" >> "$GITHUB_OUTPUT" 29 | echo "number=$(cat event.json | jq -r '.pull_request.number')" >> "$GITHUB_OUTPUT" 30 | 31 | approve: 32 | name: Approve Bot PRs 33 | needs: download 34 | if: ${{ needs.download.outputs.pr-author == 'paketo-bot' || needs.download.outputs.pr-author == 'dependabot[bot]' }} 35 | runs-on: ubuntu-22.04 36 | steps: 37 | - name: Check Commit Verification 38 | id: unverified-commits 39 | uses: paketo-buildpacks/github-config/actions/pull-request/check-unverified-commits@main 40 | with: 41 | token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} 42 | repo: ${{ github.repository }} 43 | number: ${{ needs.download.outputs.pr-number }} 44 | 45 | - name: Check for Human Commits 46 | id: human-commits 47 | uses: paketo-buildpacks/github-config/actions/pull-request/check-human-commits@main 48 | with: 49 | token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} 50 | repo: ${{ github.repository }} 51 | number: ${{ needs.download.outputs.pr-number }} 52 | 53 | - name: Checkout 54 | if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' 55 | uses: actions/checkout@v3 56 | 57 | - name: Approve 58 | if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' 59 | uses: paketo-buildpacks/github-config/actions/pull-request/approve@main 60 | with: 61 | token: ${{ secrets.PAKETO_BOT_REVIEWER_GITHUB_TOKEN }} 62 | number: ${{ needs.download.outputs.pr-number }} 63 | 64 | - name: Enable Auto-Merge 65 | if: steps.human-commits.outputs.human_commits == 'false' && steps.unverified-commits.outputs.unverified_commits == 'false' 66 | run: | 67 | gh pr merge ${{ needs.download.outputs.pr-number }} --auto --rebase 68 | env: 69 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 70 | -------------------------------------------------------------------------------- /.github/workflows/label-pr.yml: -------------------------------------------------------------------------------- 1 | name: Set / Validate PR Labels 2 | on: 3 | pull_request_target: 4 | branches: 5 | - main 6 | types: 7 | - synchronize 8 | - opened 9 | - reopened 10 | - labeled 11 | - unlabeled 12 | 13 | concurrency: pr_labels_${{ github.event.number }} 14 | 15 | jobs: 16 | autolabel: 17 | name: Ensure Minimal Semver Labels 18 | runs-on: ubuntu-22.04 19 | steps: 20 | - name: Check Minimal Semver Labels 21 | uses: mheap/github-action-required-labels@v3 22 | with: 23 | count: 1 24 | labels: semver:major, semver:minor, semver:patch 25 | mode: exactly 26 | env: 27 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 28 | 29 | - name: Auto-label Semver 30 | if: ${{ failure() }} 31 | uses: paketo-buildpacks/github-config/actions/pull-request/auto-semver-label@main 32 | env: 33 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 34 | -------------------------------------------------------------------------------- /.github/workflows/lint-yaml.yml: -------------------------------------------------------------------------------- 1 | name: Lint Workflows 2 | 3 | on: 4 | pull_request: 5 | paths: 6 | - '.github/**.yml' 7 | - '.github/**.yaml' 8 | 9 | jobs: 10 | lintYaml: 11 | runs-on: ubuntu-22.04 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Checkout github-config 16 | uses: actions/checkout@v3 17 | with: 18 | repository: paketo-buildpacks/github-config 19 | path: github-config 20 | 21 | - name: Set up Python 22 | uses: actions/setup-python@v4 23 | with: 24 | python-version: 3.8 25 | 26 | - name: Install yamllint 27 | run: pip install yamllint 28 | 29 | - name: Lint YAML files 30 | run: yamllint ./.github -c github-config/.github/.yamllint 31 | -------------------------------------------------------------------------------- /.github/workflows/lint.yml: -------------------------------------------------------------------------------- 1 | name: Lint 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | pull_request: 8 | branches: 9 | - main 10 | 11 | jobs: 12 | golangci: 13 | name: lint 14 | runs-on: ubuntu-22.04 15 | steps: 16 | - name: Setup Go 17 | uses: actions/setup-go@v3 18 | with: 19 | go-version: 'stable' 20 | 21 | - name: Checkout 22 | uses: actions/checkout@v3 23 | 24 | - name: golangci-lint 25 | uses: golangci/golangci-lint-action@v3 26 | with: 27 | version: latest 28 | args: --timeout 3m0s 29 | -------------------------------------------------------------------------------- /.github/workflows/publish-releases.yml: -------------------------------------------------------------------------------- 1 | name: Publish Draft Releases 2 | 3 | on: 4 | workflow_dispatch: {} 5 | schedule: 6 | - cron: '0 5 * * FRI' # Weekly on Friday at 5:00 AM UTC 7 | 8 | concurrency: 9 | group: publish-release 10 | 11 | jobs: 12 | publish: 13 | name: Publish 14 | runs-on: ubuntu-22.04 15 | steps: 16 | - name: Publish Draft Release With Highest Semantic Version 17 | id: drafts 18 | env: 19 | GITHUB_TOKEN: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 20 | uses: paketo-buildpacks/github-config/actions/release/publish-drafts@main 21 | with: 22 | repo: ${{ github.repository }} 23 | 24 | failure: 25 | name: Alert on Failure 26 | runs-on: ubuntu-22.04 27 | needs: [ publish ] 28 | if: ${{ always() && needs.publish.result == 'failure' }} 29 | steps: 30 | - name: File Failure Alert Issue 31 | uses: paketo-buildpacks/github-config/actions/issue/file@main 32 | with: 33 | token: ${{ secrets.GITHUB_TOKEN }} 34 | repo: ${{ github.repository }} 35 | label: "failure:release" 36 | comment_if_exists: true 37 | issue_title: "Failure: Publish draft releases" 38 | issue_body: | 39 | Publish All Draft Releases workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). 40 | comment_body: | 41 | Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} 42 | -------------------------------------------------------------------------------- /.github/workflows/synchronize-labels.yml: -------------------------------------------------------------------------------- 1 | name: Synchronize Labels 2 | "on": 3 | push: 4 | branches: 5 | - main 6 | paths: 7 | - .github/labels.yml 8 | workflow_dispatch: {} 9 | jobs: 10 | synchronize: 11 | name: Synchronize Labels 12 | runs-on: 13 | - ubuntu-22.04 14 | steps: 15 | - uses: actions/checkout@v3 16 | - uses: micnncim/action-label-syncer@v1 17 | env: 18 | GITHUB_TOKEN: ${{ github.token }} 19 | -------------------------------------------------------------------------------- /.github/workflows/test-pull-request.yml: -------------------------------------------------------------------------------- 1 | name: Test Pull Request 2 | 3 | on: 4 | pull_request: 5 | branches: 6 | - main 7 | 8 | concurrency: 9 | # only one instance of test suite per PR at one time 10 | group: pr-${{ github.event.number }} 11 | cancel-in-progress: true 12 | 13 | jobs: 14 | builders: 15 | name: Get Builders for Testing 16 | runs-on: ubuntu-22.04 17 | outputs: 18 | builders: ${{ steps.builders.outputs.builders }} 19 | steps: 20 | - name: Checkout 21 | uses: actions/checkout@v3 22 | - name: Get builders from integration.json 23 | id: builders 24 | run: | 25 | source "${{ github.workspace }}/scripts/.util/builders.sh" 26 | 27 | builders="$(util::builders::list "${{ github.workspace }}/integration.json")" 28 | printf "Output: %s\n" "${builders}" 29 | printf "builders=%s\n" "${builders}" >> "$GITHUB_OUTPUT" 30 | 31 | integration: 32 | name: Integration Tests with Builders 33 | runs-on: ubuntu-22.04 34 | needs: [builders] 35 | strategy: 36 | matrix: 37 | builder: ${{ fromJSON(needs.builders.outputs.builders) }} 38 | fail-fast: false # don't cancel all test jobs when one fails 39 | steps: 40 | - name: Setup Go 41 | uses: actions/setup-go@v3 42 | with: 43 | go-version: 'stable' 44 | 45 | - name: Checkout 46 | uses: actions/checkout@v3 47 | 48 | - name: Run Integration Tests 49 | env: 50 | TMPDIR: "${{ runner.temp }}" 51 | run: ./scripts/integration.sh --builder ${{ matrix.builder }} 52 | 53 | roundup: 54 | name: Integration Tests 55 | if: ${{ always() }} 56 | runs-on: ubuntu-22.04 57 | needs: integration 58 | steps: 59 | - run: | 60 | result="${{ needs.integration.result }}" 61 | if [[ $result == "success" ]]; then 62 | echo "Integration tests passed against all builders" 63 | exit 0 64 | else 65 | echo "Integration tests failed on one or more builders" 66 | exit 1 67 | fi 68 | 69 | upload: 70 | name: Upload Workflow Event Payload 71 | runs-on: ubuntu-22.04 72 | steps: 73 | - name: Upload Artifact 74 | uses: actions/upload-artifact@v3 75 | with: 76 | name: event-payload 77 | path: ${{ github.event_path }} 78 | -------------------------------------------------------------------------------- /.github/workflows/update-buildpack-toml.yml: -------------------------------------------------------------------------------- 1 | name: Update buildpack.toml 2 | 3 | on: 4 | schedule: 5 | - cron: '1 6 * * *' # daily at 06:01 UTC 6 | workflow_dispatch: {} 7 | 8 | concurrency: buildpack_update 9 | 10 | jobs: 11 | update-buildpack-toml: 12 | runs-on: ubuntu-22.04 13 | name: Update buildpack.toml 14 | steps: 15 | 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | 19 | - name: Checkout Branch 20 | uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main 21 | with: 22 | branch: automation/buildpack.toml/update 23 | 24 | - name: Update buildpack.toml 25 | id: update 26 | uses: paketo-buildpacks/github-config/actions/buildpack/update@main 27 | 28 | - name: Commit 29 | id: commit 30 | uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main 31 | with: 32 | message: "Updating buildpacks in buildpack.toml" 33 | pathspec: "." 34 | keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} 35 | key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} 36 | 37 | - name: Push Branch 38 | if: ${{ steps.commit.outputs.commit_sha != '' }} 39 | uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main 40 | with: 41 | branch: automation/buildpack.toml/update 42 | 43 | - name: Open Pull Request (no semver label) 44 | if: ${{ steps.commit.outputs.commit_sha != '' && steps.update.outputs.semver_bump == '' }} 45 | uses: paketo-buildpacks/github-config/actions/pull-request/open@main 46 | with: 47 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 48 | title: "Updates buildpacks in buildpack.toml" 49 | branch: automation/buildpack.toml/update 50 | 51 | - name: Open Pull Request 52 | if: ${{ steps.commit.outputs.commit_sha != '' && steps.update.outputs.semver_bump != '' }} 53 | uses: paketo-buildpacks/github-config/actions/pull-request/open@main 54 | with: 55 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 56 | title: "Updates buildpacks in buildpack.toml" 57 | branch: automation/buildpack.toml/update 58 | label: "semver:${{ steps.update.outputs.semver_bump }}" 59 | 60 | failure: 61 | name: Alert on Failure 62 | runs-on: ubuntu-22.04 63 | needs: [update-buildpack-toml] 64 | if: ${{ always() && needs.update-buildpack-toml.result == 'failure' }} 65 | steps: 66 | - name: File Failure Alert Issue 67 | uses: paketo-buildpacks/github-config/actions/issue/file@main 68 | with: 69 | token: ${{ secrets.GITHUB_TOKEN }} 70 | repo: ${{ github.repository }} 71 | label: "failure:update-buildpack-toml" 72 | comment_if_exists: true 73 | issue_title: "Failure: Update Buildpack TOML workflow" 74 | issue_body: | 75 | Update Buildpack TOML workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). 76 | comment_body: | 77 | Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} 78 | -------------------------------------------------------------------------------- /.github/workflows/update-github-config.yml: -------------------------------------------------------------------------------- 1 | name: Update shared github-config 2 | 3 | on: 4 | schedule: 5 | - cron: '20 17 * * *' # daily at 17:20 UTC 6 | workflow_dispatch: {} 7 | 8 | concurrency: github_config_update 9 | 10 | jobs: 11 | build: 12 | name: Create PR to update shared files 13 | runs-on: ubuntu-22.04 14 | steps: 15 | 16 | - name: Checkout 17 | uses: actions/checkout@v3 18 | with: 19 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 20 | 21 | - name: Checkout github-config 22 | uses: actions/checkout@v3 23 | with: 24 | repository: paketo-buildpacks/github-config 25 | path: github-config 26 | 27 | - name: Checkout Branch 28 | uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main 29 | with: 30 | branch: automation/github-config/update 31 | 32 | - name: Run the sync action 33 | uses: paketo-buildpacks/github-config/actions/sync@main 34 | with: 35 | workspace: /github/workspace 36 | config: /github/workspace/github-config/language-family 37 | 38 | - name: Cleanup 39 | run: rm -rf github-config 40 | 41 | - name: Commit 42 | id: commit 43 | uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main 44 | with: 45 | message: "Updating github-config" 46 | pathspec: "." 47 | keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} 48 | key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} 49 | 50 | - name: Push Branch 51 | if: ${{ steps.commit.outputs.commit_sha != '' }} 52 | uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main 53 | with: 54 | branch: automation/github-config/update 55 | 56 | - name: Open Pull Request 57 | if: ${{ steps.commit.outputs.commit_sha != '' }} 58 | uses: paketo-buildpacks/github-config/actions/pull-request/open@main 59 | with: 60 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 61 | title: "Updates github-config" 62 | branch: automation/github-config/update 63 | 64 | failure: 65 | name: Alert on Failure 66 | runs-on: ubuntu-22.04 67 | needs: [build] 68 | if: ${{ always() && needs.build.result == 'failure' }} 69 | steps: 70 | - name: File Failure Alert Issue 71 | uses: paketo-buildpacks/github-config/actions/issue/file@main 72 | with: 73 | token: ${{ secrets.GITHUB_TOKEN }} 74 | repo: ${{ github.repository }} 75 | label: "failure:update-github-config" 76 | comment_if_exists: true 77 | issue_title: "Failure: Update GitHub config workflow" 78 | issue_body: | 79 | Update GitHub config workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). 80 | comment_body: | 81 | Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} 82 | -------------------------------------------------------------------------------- /.github/workflows/update-go-mod-version.yml: -------------------------------------------------------------------------------- 1 | name: Update Go version 2 | 3 | on: 4 | schedule: 5 | - cron: '13 4 * * MON' # every monday at 4:13 UTC 6 | workflow_dispatch: 7 | 8 | concurrency: update-go 9 | 10 | jobs: 11 | update-go: 12 | name: Update go toolchain in go.mod 13 | runs-on: ubuntu-latest 14 | steps: 15 | - name: Check out code 16 | uses: actions/checkout@v4 17 | - name: Checkout PR Branch 18 | uses: paketo-buildpacks/github-config/actions/pull-request/checkout-branch@main 19 | with: 20 | branch: automation/go-mod-update/update-main 21 | - name: Setup Go 22 | id: setup-go 23 | uses: actions/setup-go@v5 24 | with: 25 | go-version: 'stable' 26 | - name: Get current go toolchain version 27 | id: current-go-version 28 | uses: paketo-buildpacks/github-config/actions/update-go-mod-version@main 29 | with: 30 | go-version: ${{ steps.setup-go.outputs.go-version }} 31 | - name: Go mod tidy 32 | run: | 33 | #!/usr/bin/env bash 34 | set -euo pipefail 35 | shopt -s inherit_errexit 36 | 37 | echo "Before running go mod tidy" 38 | echo "head -n10 go.mod " 39 | head -n10 go.mod 40 | 41 | echo "git diff" 42 | git diff 43 | 44 | echo "Running go mod tidy" 45 | go mod tidy 46 | 47 | echo "After running go mod tidy" 48 | echo "head -n10 go.mod " 49 | head -n10 go.mod 50 | 51 | echo "git diff" 52 | git diff 53 | - name: Commit 54 | id: commit 55 | uses: paketo-buildpacks/github-config/actions/pull-request/create-commit@main 56 | with: 57 | message: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" 58 | pathspec: "." 59 | keyid: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY_ID }} 60 | key: ${{ secrets.PAKETO_BOT_GPG_SIGNING_KEY }} 61 | 62 | - name: Push Branch 63 | if: ${{ steps.commit.outputs.commit_sha != '' }} 64 | uses: paketo-buildpacks/github-config/actions/pull-request/push-branch@main 65 | with: 66 | branch: automation/go-mod-update/update-main 67 | 68 | - name: Open Pull Request 69 | if: ${{ steps.commit.outputs.commit_sha != '' }} 70 | uses: paketo-buildpacks/github-config/actions/pull-request/open@main 71 | with: 72 | token: ${{ secrets.PAKETO_BOT_GITHUB_TOKEN }} 73 | title: "Updates go mod version to ${{ steps.setup-go.outputs.go-version }}" 74 | branch: automation/go-mod-update/update-main 75 | 76 | failure: 77 | name: Alert on Failure 78 | runs-on: ubuntu-22.04 79 | needs: [update-go] 80 | if: ${{ always() && needs.update-go.result == 'failure' }} 81 | steps: 82 | - name: File Failure Alert Issue 83 | uses: paketo-buildpacks/github-config/actions/issue/file@main 84 | with: 85 | token: ${{ secrets.GITHUB_TOKEN }} 86 | repo: ${{ github.repository }} 87 | label: "failure:update-go-version" 88 | comment_if_exists: true 89 | issue_title: "Failure: Update Go Mod Version workflow" 90 | issue_body: | 91 | Update Go Mod Version workflow [failed](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}}). 92 | comment_body: | 93 | Another failure occurred: https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} 94 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /.bin 2 | /build 3 | -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | php-cnb 2 | 3 | Copyright (c) 2013-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. 4 | 5 | Licensed under the Apache License, Version 2.0 (the "License"); 6 | you may not use this file except in compliance with the License. 7 | You may obtain a copy of the License at 8 | 9 | http://www.apache.org/licenses/LICENSE-2.0 10 | 11 | Unless required by applicable law or agreed to in writing, software 12 | distributed under the License is distributed on an "AS IS" BASIS, 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | See the License for the specific language governing permissions and 15 | limitations under the License. 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Paketo Buildpack for PHP 2 | ## `gcr.io/paketo-buildpacks/php` 3 | 4 | The PHP Paketo Buildpack provides a set of collaborating buildpacks that 5 | enable the building of a PHP-based application. These buildpacks include: 6 | - [PHP Dist CNB](https://github.com/paketo-buildpacks/php-dist) 7 | - [PHP HTTPD CNB](https://github.com/paketo-buildpacks/php-httpd) 8 | - [PHP Nginx CNB](https://github.com/paketo-buildpacks/php-nginx) 9 | - [PHP Built-in Server CNB](https://github.com/paketo-buildpacks/php-builtin-server) 10 | - [PHP FPM CNB](https://github.com/paketo-buildpacks/php-fpm) 11 | - [PHP Start CNB](https://github.com/paketo-buildpacks/php-start) 12 | - [PHP Redis Session Handler CNB](https://github.com/paketo-buildpacks/php-redis-session-handler) 13 | - [PHP Memcached Session Handler CNB](https://github.com/paketo-buildpacks/php-memcached-session-handler) 14 | - [Composer CNB](https://github.com/paketo-buildpacks/composer) 15 | - [Composer Install CNB](https://github.com/paketo-buildpacks/composer-install) 16 | - [Apache HTTPD CNB](https://github.com/paketo-buildpacks/httpd) 17 | - [NGINX CNB](https://github.com/paketo-buildpacks/nginx) 18 | 19 | The buildpack supports building PHP console and web applications. Web 20 | applications can be run on either the [built-in PHP 21 | webserver](https://www.php.net/manual/en/features.commandline.webserver.php), 22 | [Apache HTTPD](https://httpd.apache.org/) or [NGINX](https://www.nginx.com/). 23 | The buildpack also provides optional support for the utilization of 24 | [Composer](https://getcomposer.org) as a package manager. 25 | 26 | Usage examples can be found in the 27 | [`samples` repository under the `php` directory](https://github.com/paketo-buildpacks/samples/tree/main/php). 28 | 29 | This buildpack also includes the following utility buildpacks: 30 | - [Procfile CNB](https://github.com/paketo-buildpacks/procfile) 31 | - [Environment Variables CNB](https://github.com/paketo-buildpacks/environment-variables) 32 | - [Image Labels CNB](https://github.com/paketo-buildpacks/image-labels) 33 | - [CA Certificates CNB](https://github.com/paketo-buildpacks/ca-certificates) 34 | 35 | #### The PHP buildpack is compatible with the following builder(s): 36 | 37 | - [Paketo Jammy Full Builder](https://github.com/paketo-buildpacks/builder-jammy-full) 38 | - [Paketo Bionic Full Builder](https://github.com/paketo-buildpacks/full-builder) 39 | 40 | #### Docs 41 | 42 | Check out the [PHP Paketo Buildpack 43 | docs](https://paketo.io/docs/buildpacks/language-family-buildpacks/php) for 44 | more information. 45 | -------------------------------------------------------------------------------- /integration.json: -------------------------------------------------------------------------------- 1 | { 2 | "builders": [ 3 | "index.docker.io/paketobuildpacks/builder-jammy-buildpackless-full:latest", 4 | "index.docker.io/paketobuildpacks/builder:buildpackless-full" 5 | ] 6 | } 7 | -------------------------------------------------------------------------------- /integration/composer_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "testing" 8 | 9 | "github.com/paketo-buildpacks/occam" 10 | "github.com/sclevine/spec" 11 | 12 | . "github.com/onsi/gomega" 13 | . "github.com/paketo-buildpacks/occam/matchers" 14 | ) 15 | 16 | func testComposer(t *testing.T, context spec.G, it spec.S) { 17 | var ( 18 | Expect = NewWithT(t).Expect 19 | Eventually = NewWithT(t).Eventually 20 | 21 | pack occam.Pack 22 | docker occam.Docker 23 | ) 24 | 25 | it.Before(func() { 26 | pack = occam.NewPack().WithVerbose() 27 | docker = occam.NewDocker() 28 | }) 29 | 30 | context("building a PHP app that contains vendored Composer packages", func() { 31 | var ( 32 | image occam.Image 33 | container occam.Container 34 | 35 | name string 36 | source string 37 | ) 38 | 39 | it.Before(func() { 40 | var err error 41 | name, err = occam.RandomName() 42 | Expect(err).NotTo(HaveOccurred()) 43 | source, err = occam.Source(filepath.Join("testdata", "vendored_composer_app")) 44 | Expect(err).NotTo(HaveOccurred()) 45 | }) 46 | 47 | it.After(func() { 48 | Expect(docker.Container.Remove.Execute(container.ID)).To(Succeed()) 49 | Expect(docker.Image.Remove.Execute(image.ID)).To(Succeed()) 50 | Expect(docker.Volume.Remove.Execute(occam.CacheVolumeNames(name))).To(Succeed()) 51 | Expect(os.RemoveAll(source)).To(Succeed()) 52 | }) 53 | 54 | it("creates a working OCI image", func() { 55 | var err error 56 | var logs fmt.Stringer 57 | image, logs, err = pack.WithNoColor().Build. 58 | WithBuildpacks(phpBuildpack). 59 | WithEnv(map[string]string{ 60 | "BP_PHP_SERVER": "httpd", 61 | }). 62 | WithPullPolicy("never"). 63 | Execute(name, source) 64 | Expect(err).NotTo(HaveOccurred(), logs.String()) 65 | 66 | container, err = docker.Container.Run. 67 | WithEnv(map[string]string{"PORT": "8080"}). 68 | WithPublish("8080"). 69 | WithPublishAll(). 70 | Execute(image.ID) 71 | Expect(err).NotTo(HaveOccurred()) 72 | 73 | Eventually(container).Should(Serve(ContainSubstring("This is a PHP app.")).OnPort(8080)) 74 | 75 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for CA Certificates"))) 76 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Distribution"))) 77 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Composer"))) 78 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Composer Install"))) 79 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for Apache HTTP Server"))) 80 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP FPM"))) 81 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP HTTPD"))) 82 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Start"))) 83 | }) 84 | }) 85 | } 86 | -------------------------------------------------------------------------------- /integration/init_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | "fmt" 5 | "os/exec" 6 | "path/filepath" 7 | "testing" 8 | "time" 9 | 10 | "github.com/paketo-buildpacks/occam" 11 | "github.com/sclevine/spec" 12 | "github.com/sclevine/spec/report" 13 | 14 | . "github.com/onsi/gomega" 15 | "github.com/onsi/gomega/format" 16 | ) 17 | 18 | var ( 19 | phpBuildpack string 20 | builder occam.Builder 21 | memcachedImage string 22 | redisImage string 23 | ) 24 | 25 | func TestIntegration(t *testing.T) { 26 | pack := occam.NewPack() 27 | docker := occam.NewDocker() 28 | Expect := NewWithT(t).Expect 29 | 30 | format.MaxLength = 0 31 | 32 | output, err := exec.Command("bash", "-c", "../scripts/package.sh --version 1.2.3").CombinedOutput() 33 | Expect(err).NotTo(HaveOccurred(), string(output)) 34 | 35 | phpBuildpack, err = filepath.Abs("../build/buildpackage.cnb") 36 | Expect(err).NotTo(HaveOccurred()) 37 | 38 | SetDefaultEventuallyTimeout(10 * time.Second) 39 | 40 | builder, err = pack.Builder.Inspect.Execute() 41 | Expect(err).NotTo(HaveOccurred()) 42 | 43 | // pull and re-tag memcached image with builder-specific naming 44 | // this will prevent flakes in which we try to reference/remove the same image in parallel bionic/jammy builder tests 45 | memcachedImage = fmt.Sprintf("memcached-%s:latest", builder.LocalInfo.Stack.ID) 46 | Expect(docker.Pull.Execute("memcached:latest")).To(Succeed()) 47 | Expect(docker.Image.Tag.Execute("memcached:latest", memcachedImage)).To(Succeed()) 48 | Expect(docker.Image.Remove.WithForce().Execute("memcached:latest")).To(Succeed()) 49 | 50 | // pull and re-tag redis image with builder-specific naming 51 | // this will prevent flakes in which we try to reference/remove the same image in parallel bionic/jammy builder tests 52 | redisImage = fmt.Sprintf("redis-%s:latest", builder.LocalInfo.Stack.ID) 53 | Expect(docker.Pull.Execute("redis:latest")).To(Succeed()) 54 | Expect(docker.Image.Tag.Execute("redis:latest", redisImage)).To(Succeed()) 55 | Expect(docker.Image.Remove.WithForce().Execute("redis:latest")).To(Succeed()) 56 | 57 | suite := spec.New("Integration", spec.Parallel(), spec.Report(report.Terminal{})) 58 | 59 | // This test will only run on the Bionic full stack, to test the stack upgrade scenario. 60 | // All other tests will run against the Bionic full stack and Jammy full stack 61 | if builder.BuilderName == "paketobuildpacks/builder:buildpackless-full" { 62 | suite("StackUpgrades", testStackUpgrades) 63 | } 64 | 65 | suite("Builtin Server", testPhpBuiltinServer) 66 | suite("Composer", testComposer) 67 | suite("HTTPD", testPhpHttpd) 68 | suite("Memcached Session Handler", testMemcachedSessionHandler) 69 | suite("Nginx", testPhpNginx) 70 | suite("Redis Session Handler", testRedisSessionHandler) 71 | suite("Reproducible Builds", testReproducibleBuilds) 72 | suite.Run(t) 73 | 74 | // Clean up memcached image 75 | Expect(docker.Image.Remove.WithForce().Execute(memcachedImage)).To(Succeed()) 76 | // Clean up redis image 77 | Expect(docker.Image.Remove.WithForce().Execute(redisImage)).To(Succeed()) 78 | } 79 | -------------------------------------------------------------------------------- /integration/redis_session_handler_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | "fmt" 5 | "net/http" 6 | "net/http/cookiejar" 7 | "os" 8 | "path/filepath" 9 | "testing" 10 | 11 | "github.com/paketo-buildpacks/occam" 12 | "github.com/sclevine/spec" 13 | 14 | . "github.com/onsi/gomega" 15 | . "github.com/paketo-buildpacks/occam/matchers" 16 | ) 17 | 18 | func testRedisSessionHandler(t *testing.T, context spec.G, it spec.S) { 19 | var ( 20 | Expect = NewWithT(t).Expect 21 | Eventually = NewWithT(t).Eventually 22 | 23 | pack occam.Pack 24 | docker occam.Docker 25 | source string 26 | name string 27 | ) 28 | 29 | it.Before(func() { 30 | pack = occam.NewPack().WithVerbose() 31 | docker = occam.NewDocker() 32 | }) 33 | 34 | context("building a PHP app that uses a redis session handler", func() { 35 | var ( 36 | image occam.Image 37 | container occam.Container 38 | redisContainer occam.Container 39 | binding string 40 | ) 41 | 42 | it.Before(func() { 43 | var err error 44 | name, err = occam.RandomName() 45 | Expect(err).NotTo(HaveOccurred()) 46 | 47 | source, err = occam.Source(filepath.Join("testdata", "session_handler_apps")) 48 | Expect(err).NotTo(HaveOccurred()) 49 | 50 | binding = filepath.Join(source, "redis_binding") 51 | 52 | redisContainer, err = docker.Container.Run. 53 | WithPublish("6379"). 54 | Execute(redisImage) 55 | Expect(err).NotTo(HaveOccurred()) 56 | 57 | ipAddress, err := redisContainer.IPAddressForNetwork("bridge") 58 | Expect(err).NotTo(HaveOccurred()) 59 | 60 | Expect(os.WriteFile(filepath.Join(source, "redis_binding", "host"), []byte(ipAddress), os.ModePerm)).To(Succeed()) 61 | }) 62 | 63 | it.After(func() { 64 | Expect(docker.Container.Remove.Execute(redisContainer.ID)).To(Succeed()) 65 | Expect(docker.Container.Remove.Execute(container.ID)).To(Succeed()) 66 | Expect(docker.Image.Remove.Execute(image.ID)).To(Succeed()) 67 | Expect(docker.Volume.Remove.Execute(occam.CacheVolumeNames(name))).To(Succeed()) 68 | Expect(os.RemoveAll(source)).To(Succeed()) 69 | }) 70 | 71 | it("creates a working OCI image", func() { 72 | var err error 73 | var logs fmt.Stringer 74 | image, logs, err = pack.WithNoColor().Build. 75 | WithBuildpacks(phpBuildpack). 76 | WithEnv(map[string]string{ 77 | "BP_PHP_WEB_DIR": "htdocs", 78 | "BP_LOG_LEVEL": "DEBUG", 79 | "SERVICE_BINDING_ROOT": "/bindings", 80 | }). 81 | WithPullPolicy("never"). 82 | WithVolumes(fmt.Sprintf("%s:/bindings/php-redis-session", binding)). 83 | Execute(name, source) 84 | Expect(err).NotTo(HaveOccurred(), logs.String()) 85 | 86 | container, err = docker.Container.Run. 87 | WithEnv(map[string]string{"PORT": "8080"}). 88 | WithPublish("8080"). 89 | WithPublishAll(). 90 | Execute(image.ID) 91 | Expect(err).NotTo(HaveOccurred()) 92 | 93 | jar, err := cookiejar.New(nil) 94 | Expect(err).NotTo(HaveOccurred()) 95 | 96 | client := &http.Client{ 97 | Jar: jar, 98 | } 99 | 100 | Eventually(container).Should(Serve(ContainSubstring("1")).WithClient(client).OnPort(8080).WithEndpoint("/index.php")) 101 | Eventually(container).Should(Serve(ContainSubstring("2")).WithClient(client).OnPort(8080).WithEndpoint("/index.php")) 102 | 103 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Distribution"))) 104 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Built-in Server"))) 105 | Expect(logs).To(ContainLines(ContainSubstring("Paketo Buildpack for PHP Redis Session Handler"))) 106 | }) 107 | }) 108 | } 109 | -------------------------------------------------------------------------------- /integration/stack_upgrade_test.go: -------------------------------------------------------------------------------- 1 | package integration_test 2 | 3 | import ( 4 | "fmt" 5 | "os" 6 | "path/filepath" 7 | "testing" 8 | 9 | "github.com/paketo-buildpacks/occam" 10 | "github.com/sclevine/spec" 11 | 12 | . "github.com/onsi/gomega" 13 | . "github.com/paketo-buildpacks/occam/matchers" 14 | ) 15 | 16 | func testStackUpgrades(t *testing.T, context spec.G, it spec.S) { 17 | var ( 18 | Expect = NewWithT(t).Expect 19 | Eventually = NewWithT(t).Eventually 20 | 21 | imageIDs map[string]struct{} 22 | containerIDs map[string]struct{} 23 | 24 | pack occam.Pack 25 | docker occam.Docker 26 | 27 | name string 28 | source string 29 | ) 30 | 31 | it.Before(func() { 32 | var err error 33 | name, err = occam.RandomName() 34 | Expect(err).NotTo(HaveOccurred()) 35 | 36 | pack = occam.NewPack() 37 | docker = occam.NewDocker() 38 | 39 | imageIDs = map[string]struct{}{} 40 | containerIDs = map[string]struct{}{} 41 | 42 | // pull images associated with the jammy builder incase they haven't been pulled yet 43 | Expect(docker.Pull.Execute("paketobuildpacks/builder-jammy-buildpackless-full")).To(Succeed()) 44 | Expect(docker.Pull.Execute("paketobuildpacks/run-jammy-full")).To(Succeed()) 45 | jammyBuilder, err := pack.Builder.Inspect.Execute("paketobuildpacks/builder-jammy-buildpackless-full") 46 | Expect(err).NotTo(HaveOccurred()) 47 | Expect(docker.Pull.Execute( 48 | fmt.Sprintf("%s:%s", "buildpacksio/lifecycle", jammyBuilder.RemoteInfo.Lifecycle.Version), 49 | )).To(Succeed()) 50 | }) 51 | 52 | it.After(func() { 53 | for id := range containerIDs { 54 | Expect(docker.Container.Remove.Execute(id)).To(Succeed()) 55 | } 56 | 57 | for id := range imageIDs { 58 | Expect(docker.Image.Remove.Execute(id)).To(Succeed()) 59 | } 60 | 61 | Expect(docker.Volume.Remove.Execute(occam.CacheVolumeNames(name))).To(Succeed()) 62 | Expect(os.RemoveAll(source)).To(Succeed()) 63 | }) 64 | 65 | context("building a composer app and the stack changes between builds", func() { 66 | var ( 67 | err error 68 | logs fmt.Stringer 69 | firstImage occam.Image 70 | secondImage occam.Image 71 | 72 | firstContainer occam.Container 73 | secondContainer occam.Container 74 | ) 75 | 76 | it.Before(func() { 77 | source, err = occam.Source(filepath.Join("testdata", "vendored_composer_app")) 78 | Expect(err).NotTo(HaveOccurred()) 79 | }) 80 | 81 | it("creates a working OCI image on rebuild", func() { 82 | build := pack.WithNoColor().Build. 83 | WithPullPolicy("never"). 84 | WithEnv(map[string]string{ 85 | "BP_PHP_SERVER": "httpd", 86 | }). 87 | WithBuildpacks(phpBuildpack) 88 | 89 | firstImage, logs, err = build.Execute(name, source) 90 | Expect(err).NotTo(HaveOccurred(), logs.String()) 91 | imageIDs[firstImage.ID] = struct{}{} 92 | 93 | firstContainer, err = docker.Container.Run. 94 | WithEnv(map[string]string{"PORT": "8080"}). 95 | WithPublish("8080"). 96 | WithPublishAll(). 97 | Execute(firstImage.ID) 98 | Expect(err).NotTo(HaveOccurred()) 99 | 100 | containerIDs[firstContainer.ID] = struct{}{} 101 | Eventually(firstContainer).Should(Serve(ContainSubstring("This is a PHP app.")).OnPort(8080)) 102 | 103 | secondImage, logs, err = build.WithBuilder("paketobuildpacks/builder-jammy-buildpackless-full").Execute(name, source) 104 | Expect(err).NotTo(HaveOccurred(), logs.String()) 105 | 106 | imageIDs[secondImage.ID] = struct{}{} 107 | 108 | secondContainer, err = docker.Container.Run. 109 | WithEnv(map[string]string{"PORT": "8080"}). 110 | WithPublish("8080"). 111 | WithPublishAll(). 112 | Execute(secondImage.ID) 113 | Expect(err).NotTo(HaveOccurred()) 114 | 115 | containerIDs[secondContainer.ID] = struct{}{} 116 | Eventually(secondContainer).Should(Serve(ContainSubstring("This is a PHP app.")).OnPort(8080)) 117 | }) 118 | }) 119 | } 120 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/binding/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFeTCCA2GgAwIBAgICB+UwDQYJKoZIhvcNAQELBQAwTjEaMBgGA1UEChMRUGFr 3 | ZXRvIEJ1aWxkcGFja3MxMDAuBgNVBAMTJ1Bha2V0byBCdWlsZHBhY2tzIENlcnRp 4 | ZmljYXRlIEF1dGhvcml0eTAeFw0yMTAzMDIxNjU5MjRaFw0zMTAzMDIxNjU5MjRa 5 | ME4xGjAYBgNVBAoTEVBha2V0byBCdWlsZHBhY2tzMTAwLgYDVQQDEydQYWtldG8g 6 | QnVpbGRwYWNrcyBDZXJ0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RUWnsuHQIR0MS4k8Bp6ztMiUTdAUSiY+Xv11sa4qGo/NCQdVSzp4wBEBM 23 | ZgnPTF9jU2OjxTufTDhbvYNAbM1l8+aBdF4/88s6D5OEbp3mYhCy8t82x7FKmLee 24 | 9GcQHoZxZjdcJfX5pBtDo9nakeLVbg5PgRUbFsaZyVXQL56VhfEYiM3UzqZCDDuh 25 | L+WU0pFkg0TX1xZ6438N8WD0zg44ObKEORfEvPAxbcKa+Nb8p1WsMKJmbeDDaXib 26 | wu7A+kWa5s4rf9zlDt0Y4wVFNuO602dO6VFyZXg8dcRyjRNa/0w/l4elgOPRonbl 27 | 8P9JY1KtIkZvQ8+f7NwloSGg+/Q0j2XqTSM04TP+RQ92iSNfsm+x8gZotKdUrvUN 28 | /7sLRgJvlJoBQ+bSHveT7r1IXE0zkM8535kYD8UEQ68cqZUEDOwK8qo2n4HY5oQ3 29 | 4BTkHOAEu39Ov6MrgeiSDzINc2eBadJcb5CwTKH17gLGDeQz8H4fRKSv2+6Pty6H 30 | esKmgqCE28Xnaz3snOEYSRfnG0+o5rgrXFUd0qAjpiu/rqCOXl9TeSEUM+YvjjRC 31 | /HNPsIbBVFyt0n7mYw== 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/binding/type: -------------------------------------------------------------------------------- 1 | ca-certificates 2 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/httpd_app/.httpd.conf.d/custom.conf: -------------------------------------------------------------------------------- 1 | LoadModule ssl_module modules/mod_ssl.so 2 | 3 | SSLEngine on 4 | 5 | # Server key pair 6 | SSLCertificateFile "/workspace/certs/cert.pem" 7 | SSLCertificateKeyFile "/workspace/certs/key.pem" 8 | 9 | SSLVerifyClient require 10 | SSLVerifyDepth 1 11 | 12 | # ca-certificate buildpack guarantees that the added CAs 13 | # are available via $SSL_CERT_DIR 14 | SSLCACertificatePath "${SSL_CERT_DIR}" 15 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/httpd_app/certs/ca.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFeTCCA2GgAwIBAgICB+UwDQYJKoZIhvcNAQELBQAwTjEaMBgGA1UEChMRUGFr 3 | ZXRvIEJ1aWxkcGFja3MxMDAuBgNVBAMTJ1Bha2V0byBCdWlsZHBhY2tzIENlcnRp 4 | ZmljYXRlIEF1dGhvcml0eTAeFw0yMTAzMDIxNjU5MjRaFw0zMTAzMDIxNjU5MjRa 5 | ME4xGjAYBgNVBAoTEVBha2V0byBCdWlsZHBhY2tzMTAwLgYDVQQDEydQYWtldG8g 6 | QnVpbGRwYWNrcyBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEB 7 | AQUAA4ICDwAwggIKAoICAQDGQS7V1sKolBHl7WV19S3sDZwUCP4BR0UrZqvR2hmm 8 | v0D1tsxmVDepX0hbQOMUq9oiSsDga2uNrVfvLNC81PZF+KePgTawdIVCF6eSPZyY 9 | muVDorvd7UGpKdx1AL3Ez+QhLj9PGP1EW6nU7oD/6XzJWeRkNZWxPNP0Ev6fChfN 10 | qKXkPJYNHPrq3G7LQ6do7oaexXEOMd+lxLtUObSXyzMQn50olkxbogLC0ncNb17h 11 | 8f0YzogQnZxe0LIkXTkbq47UJcZyZVXe4Vjuf6YXP8NY8ABW380hSbI/aHR0btD1 12 | mA24ups0XGcqD/4v8LtrEFm1pBC58faDQi435hVvaiuzz9wbhAMh1J18/FbiqnkR 13 | P+l2nEQOButa1F4ClZZ989bhJboW6LSafQRJT4yAzfRuTXBzAWFYJrikdVabfnwZ 14 | z2rZrR4lgj5IklEnTk1DiJVvNP87faTY4L0CZexrjj4YRq0BLvMG7hAkJ/7/5WZK 15 | nNSJf+P7PNyDNWUPR+aN8R411PUG53Mxyi+lumi6eucmLQONCIuI2EdQ4iPP+QR4 16 | 7r1eLS/+Sxn4mifux6GcDbzTrJDHXtaqCFWRyKUdooEo7dJVceJ/lxJLpn8W/enH 17 | OJs8J9IkUjtYizNkfDniIvHQoU3mQZx6P8AzKTJ7XA5i3Xw+YUVaM/z91aQML5sz 18 | xQIDAQABo2EwXzAOBgNVHQ8BAf8EBAMCAoQwHQYDVR0lBBYwFAYIKwYBBQUHAwIG 19 | CCsGAQUFBwMBMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFEwwGrd7Rto0v2qq 20 | YBRt7pucOSjzMA0GCSqGSIb3DQEBCwUAA4ICAQBHNA41hSIBvV7DNy7Winm1ls0R 21 | bICOEawuUOZnKY3Feq1XPsPj1IHaOa4TEwPyOFs89tS5Fig5jIDtpHp+f2dYRknC 22 | eLKjDBZRUWnsuHQIR0MS4k8Bp6ztMiUTdAUSiY+Xv11sa4qGo/NCQdVSzp4wBEBM 23 | ZgnPTF9jU2OjxTufTDhbvYNAbM1l8+aBdF4/88s6D5OEbp3mYhCy8t82x7FKmLee 24 | 9GcQHoZxZjdcJfX5pBtDo9nakeLVbg5PgRUbFsaZyVXQL56VhfEYiM3UzqZCDDuh 25 | L+WU0pFkg0TX1xZ6438N8WD0zg44ObKEORfEvPAxbcKa+Nb8p1WsMKJmbeDDaXib 26 | wu7A+kWa5s4rf9zlDt0Y4wVFNuO602dO6VFyZXg8dcRyjRNa/0w/l4elgOPRonbl 27 | 8P9JY1KtIkZvQ8+f7NwloSGg+/Q0j2XqTSM04TP+RQ92iSNfsm+x8gZotKdUrvUN 28 | /7sLRgJvlJoBQ+bSHveT7r1IXE0zkM8535kYD8UEQ68cqZUEDOwK8qo2n4HY5oQ3 29 | 4BTkHOAEu39Ov6MrgeiSDzINc2eBadJcb5CwTKH17gLGDeQz8H4fRKSv2+6Pty6H 30 | esKmgqCE28Xnaz3snOEYSRfnG0+o5rgrXFUd0qAjpiu/rqCOXl9TeSEUM+YvjjRC 31 | /HNPsIbBVFyt0n7mYw== 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/httpd_app/certs/cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIIFfTCCA2WgAwIBAgICBnowDQYJKoZIhvcNAQELBQAwTjEaMBgGA1UEChMRUGFr 3 | ZXRvIEJ1aWxkcGFja3MxMDAuBgNVBAMTJ1Bha2V0byBCdWlsZHBhY2tzIENlcnRp 4 | ZmljYXRlIEF1dGhvcml0eTAeFw0yMTAzMDIxNjU5MjdaFw0zMTAzMDIxNjU5Mjda 5 | MEQxGjAYBgNVBAoTEVBha2V0byBCdWlsZHBhY2tzMSYwJAYDVQQDEx1QYWtldG8g 6 | QnVpbGRwYWNrcyBDZXJ0aWZpY2F0ZTCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCC 7 | AgoCggIBAKDexTQRJcn/3xPtCWUhJv20s1pjbr1QxaJlOv6sI+xXBg0nMSn2i0d4 8 | G7BC9yt704WJEy3rnKpA7WPejGYqi5dW711Z/gkie8MNL3zR1FrOX5/MgRgGm2S0 9 | 3HNdjxs84zeanhRc64Z80Qyu7dfi7i68mUzp8Z5rwU9Lf8HuouAG9H94Uv4v/x4A 10 | gIZydiSLepG4Mp1QTznogVUMsSynwG6xWLPTsfOTA9fMidTSKSFcHeLl/qBnecWv 11 | MxQdIm8hkSlq+kGu+GXuZQA3eRBufvEhX/swZGIwla8XjDQqIWubQlLvNHm9ETMm 12 | Eru3MTX1sO71Xiv2rZhaZeg/hnUFDZrR7cvFZLbGdhkApWpmq/5lAzKKu+QRgbXN 13 | +TfMfw0Y650b4Nq718NEmwFjYp1TXWrcBB+uG4qvrtYbBC9W/BN/EuNeBUIBZIA0 14 | 66UpoKCRXbd3OKZV0OPZs4apqqi+y+P54ye5tFEoASdAN6g70P4gIklUz6ftCj8T 15 | fssPXRysqIwtZB0LTdEU0GZtfhGd32xF5RswJwxayfTOvd9c5yrqYs7iGg21MoOL 16 | uxp+LU3Nb+Q96NMW+JuJ6XNSjTzpBTTUmFKeggAgizh7r+gHiX/sJT/g50cRztc6 17 | euJLEl1u8cSqiX/p5a6Ecpieu7ORjJZqJ6LPUEv5KDDWeNvGhoGBAgMBAAGjbzBt 18 | MA4GA1UdDwEB/wQEAwIHgDAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYBBQUHAwEw 19 | DgYDVR0OBAcEBQECAwQGMCwGA1UdEQQlMCOCCWxvY2FsaG9zdIcEfwAAAYcQAAAA 20 | AAAAAAAAAAAAAAAAATANBgkqhkiG9w0BAQsFAAOCAgEAiexbcqQJxIjKFSBQSLpX 21 | q21pzxoCr8qULMoJEBTiBz+Aqn23nE076PBiKAd+8jWP2wIiQXqhdDqE0QV/MHvE 22 | v3Atabd7L5hkulUw13Gl7JtG750b2nC9EoJpimgicmh/upWtzBUcBNXUN0cY9N+I 23 | T58CfG/MYLbGR07mSeRlxnQiTMSfJ5m1G57UmqOSBqhqXai6x5/MCQHl+MIglLqh 24 | +bRzeS1ZlgFKFWaoa+lHVQt5qqDsaaQmtFdjskudEjezlsKXNmHPOFbOH9enOJ7Z 25 | 1EobCIvb9eLCjc8FL6hEGyVFACuxAkDds23idwIJXcOVPMs7JOPa/Lb5jBNbOYLc 26 | hYj1Op0piHEPosedtighQc3sFNvroDRYm46zBRrwbLTPQlplOBkZEssUnoDCJQJq 27 | TwgwucnRj0nnZtHfSsaHv5LcWjW+GI9ox2qpxx8XJgTnmr2LfiNJIBViGppqjEoZ 28 | FgGzqcd3Gle0LAXcz8mzCxHsGb0AyyVK7+GziZxTc7tiBorpn9LOA0tBlrWTrN0u 29 | ptIfJIsKo//HVwv/rhEfRapQYTMv4trF6jFF/Kh/eyfbfkndRFlu3ywdtf+3peKI 30 | vYZ8GeSBM86UvRyMA9nWbj8Q7NEsmg9ZHlzzG7iC32U+Zp1yy/rDrKqQWKxNojrv 31 | o7kYPHxnraAtNlmQEDyEQ9s= 32 | -----END CERTIFICATE----- 33 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/httpd_app/certs/key.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIV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CAyFM8//Rg2qmW5z4fAb2q 49 | 8iXk+hllfsx9FI2jHa6s7OqqPzJ+w7o6CMYXKQTGKq8obXV1k95vQWIf67krkdzA 50 | kupjszBrySfMWZdJYqwW0jiTTMyItD4L47nFWc/o7PEIvKKHO2OMUeztklg= 51 | -----END RSA PRIVATE KEY----- 52 | -------------------------------------------------------------------------------- /integration/testdata/ca_cert_apps/httpd_app/htdocs/index.php: -------------------------------------------------------------------------------- 1 | 2 |
3 |
24 | * $activationStrategy = new ChannelLevelActivationStrategy(
25 | * Logger::CRITICAL,
26 | * array(
27 | * 'request' => Logger::ALERT,
28 | * 'sensitive' => Logger::ERROR,
29 | * )
30 | * );
31 | * $handler = new FingersCrossedHandler(new StreamHandler('php://stderr'), $activationStrategy);
32 | *
33 | *
34 | * @author Mike Meessen
18 | */
19 | interface ProcessorInterface
20 | {
21 | /**
22 | * @return array The processed records
23 | */
24 | public function __invoke(array $records);
25 | }
26 |
--------------------------------------------------------------------------------
/integration/testdata/vendored_composer_app/vendor/monolog/monolog/src/Monolog/Processor/PsrLogMessageProcessor.php:
--------------------------------------------------------------------------------
1 |
7 | *
8 | * For the full copyright and license information, please view the LICENSE
9 | * file that was distributed with this source code.
10 | */
11 |
12 | namespace Monolog\Processor;
13 |
14 | use Monolog\Utils;
15 |
16 | /**
17 | * Processes a record's message according to PSR-3 rules
18 | *
19 | * It replaces {foo} with the value from $context['foo']
20 | *
21 | * @author Jordi Boggiano