Skip to content

feat: implement PKPassBundle #155

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

Merged
merged 4 commits into from
Jun 16, 2025
Merged

Conversation

tschoffelen
Copy link
Owner

Implements a new class called PKPassBundle, which allows you to package multiple passes together and present them at once in Safari:

You can use it like this:

use PKPass\PKPassBundle;

$bundle = new PKPassBundle();
$bundle->add($pass1);
$bundle->add($pass2);

$bundle->output();

Fixes #153

@tschoffelen tschoffelen requested a review from Copilot June 16, 2025 16:04
@tschoffelen tschoffelen linked an issue Jun 16, 2025 that may be closed by this pull request
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR introduces the new PKPassBundle class with associated tests, examples, and documentation to bundle multiple passes into a single .pkpasses file for Safari download. Key changes include the implementation of the PKPassBundle class with ZIP archive functionality, comprehensive PHPUnit tests to validate bundle behavior, and updated documentation and example usage.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
tests/PKPassBundleTest.php Added tests for creating, saving, and naming a pass bundle
src/PKPassBundle.php Implemented the PKPassBundle class with ZIP archive creation/output
examples/bundle.php Provided an example of creating and outputting a pass bundle
docs/PKPassBundle.md Updated documentation covering the API, usage examples, and error handling

tschoffelen and others added 3 commits June 16, 2025 17:07
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tschoffelen tschoffelen merged commit 28bc39f into master Jun 16, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Multiple Passes in a bundle
1 participant