8000 Releases · chiiya/passes · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Releases: chiiya/passes

v1.2.0

20 Feb 11:16
Compare
Choose a tag to compare
  • Fixed localizations not being included in the manifest

Full Changelog: 1.1.0...1.2.0

v1.1.0

20 Feb 09:41
Compare
Choose a tag to compare

What's Changed

  • Bump ramsey/composer-install from 2 to 3 by @dependabot in #34
  • Bump dependabot/fetch-metadata from 1.6.0 to 2.3.0 by @dependabot in #36
  • Improve openssl pkcs12 file compatibility by @Jeroenwv in #30
  • Fix issue with missing properties on Google API responses !12

Full Changelog: 1.0.1...1.1.0

v1.0.0

10 Oct 13:28
4fa6fd5
Compare
Choose a tag to compare

What's Changed

  • Replaced deprecated spatie/data-transfer-object with antwerpes/data-transfer-object

Breaking Changes

Replacing the package required several minor breaking changes:

Error Messages

In case you were manually matching and handling error messages (e.g. validation), these have now changed.

Array Constructor Notation

While not encouraged before, it was possible to pass an array as the only constructor argument to all classes. This is no longer possible. Use either the ::decode($array) function or named parameters:

// Before
$pass = new Coupon([
    'description' => '15% off purchases',
    'organizationName' => 'ACME',
    'passTypeIdentifier' => 'pass.acme.wallet',
    'serialNumber' => '1464194291627',
    'headerFields' => [
        ['key' => 'coupon-type', 'value' => '#15-percent']
    ],
]);

// After
$pass = new Coupon(
    description: '15% off purchases',
    organizationName: 'ACME',
    passTypeIdentifier: 'pass.acme.wallet',
    serialNumber: '1464194291627',
    teamIdentifier: '123456789',
    headerFields: [
        new SecondaryField(key: 'coupon-type', value: "#15-percent"),
    ],
);

// Or alternatively
$pass = Coupon::decode([
    'description' => '15% off purchases',
    'organizationName' => 'ACME',
    'passTypeIdentifier' => 'pass.acme.wallet',
    'serialNumber' => '1464194291627',
    'headerFields' => [
        ['key' => 'coupon-type', 'value' => '#15-percent']
    ],
]);

Important: The only documented example was the JWT class, for which this behavior has also changed:

// Before
$jwt = (new JWT([
    'iss' => $credentials->client_email,
    'key' => $credentials->private_key,
    'origins' => ['https://example.org'],
]))->addOfferObject($object)->sign();

// After
$jwt = (new JWT(
    iss: $credentials->client_email,
    key: $credentials->private_key,
    origins: ['https://example.org'],
))->addOfferObject($object)->sign();

Casts During Object Construction

Casts are no longer applied when the constructor is executed, but only during the encode() oder decode() functions. In practice that means that:

  • You can still pass DateTime objects to date fields, they will be casted to string when encoded and serialized, just as before.
  • Legacy values are only casted when decoding responses from Google, not when you supply legacy values to the constructor. This may lead to errors if you're still using legacy values in your application.
use Chiiya\Passes\Google\Enumerators\Offer\RedemptionChannel;

// Before, this used to work
$class = new OfferClass(
    redemptionChannel: 'instore',
);
// Now should use valid values
$class = new OfferClass(
    redemptionChannel: RedemptionChannel::INSTORE,
);

Full Changelog: 0.6.0...1.0.0

v0.6.0

18 Sep 11:27
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.5.0...0.6.0

v0.5.0

20 Aug 15:04
6f7bf72
Compare
Choose a tag to compare

What's Changed

  • Bump dependabot/fetch-metadata from 1.3.6 to 1.4.0 by @dependabot in #16
  • Bump dependabot/fetch-metadata from 1.4.0 to 1.5.1 by @dependabot in #17
  • Bump dependabot/fetch-metadata from 1.5.1 to 1.6.0 by @dependabot in #18
  • Implement a workaround for compatibility with legacy openssl pkcs12 files by @Synchro in #19

New Contributors

Full Changelog: 0.4.0...0.5.0

v0.4.0

20 Feb 16:53
7f27ba2
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.3.1...0.4.0

v0.3.1

30 Jan 11:41
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.3.0...0.3.1

v0.3.0

21 Apr 16:16
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.2.6...0.3.0

v0.2.6

01 Apr 11:04
Compare
Choose a tag to compare

What's Changed

  • Fix missing cache initialization by @pazzernick in #5
  • Use strict typing

New Contributors

Full Changelog: 0.2.5...0.2.6

0