Skip to content

Commit a96daa0

Browse files
committed
upgrading all packages to Stimulus 3
1 parent 4f56882 commit a96daa0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+307
-79
lines changed

.github/workflows/test.yaml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,21 @@ jobs:
8080
- name: Chartjs
8181
run: |
8282
cd src/Chartjs
83-
composer config platform.php 7.4.99
8483
composer update --prefer-dist --no-interaction --no-ansi --no-progress
8584
php vendor/bin/simple-phpunit
8685
- name: Cropperjs
8786
run: |
8887
cd src/Cropperjs
89-
composer config platform.php 7.4.99
9088
composer update --prefer-dist --no-interaction --no-ansi --no-progress
9189
php vendor/bin/simple-phpunit
9290
- name: Dropzone
9391
run: |
9492
cd src/Dropzone
95-
composer config platform.php 7.4.99
9693
composer update --prefer-dist --no-interaction --no-ansi --no-progress
9794
php vendor/bin/simple-phpunit
9895
- name: LazyImage
9996
run: |
10097
cd src/LazyImage
101-
composer config platform.php 7.4.99
10298
composer update --prefer-dist --no-interaction --no-ansi --no-progress
10399
php vendor/bin/simple-phpunit
104100
- name: TwigComponent

src/Chartjs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 2.0
4+
5+
- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
6+
version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
7+
for more details.
8+
39
## 1.3
410

511
- [DEPENDENCY CHANGE] `chart.js` is no longer included automatically (#93)

src/Chartjs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Symfony UX Chart.js allows you to extend its default behavior using a custom Sti
8484
```js
8585
// mychart_controller.js
8686

87-
import { Controller } from 'stimulus';
87+
import { Controller } from '@hotwired/stimulus';
8888

8989
export default class extends Controller {
9090
connect() {

src/Chartjs/Resources/assets/dist/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", {
1515
});
1616
exports["default"] = void 0;
1717

18-
var _stimulus = require("stimulus");
18+
var _stimulus = require("@hotwired/stimulus");
1919

2020
var _chart = require("chart.js");
2121

@@ -35,7 +35,7 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
3535

3636
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3737

38-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
38+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3939

4040
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4141

src/Chartjs/Resources/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
},
2121
"peerDependencies": {
2222
"chart.js": "^2.9.4",
23-
"stimulus": "^2.0.0"
23+
"@hotwired/stimulus": "^3.0.0"
2424
},
2525
"devDependencies": {
2626
"@babel/cli": "^7.12.1",
@@ -30,7 +30,7 @@
3030
"@symfony/stimulus-testing": "^1.1.0",
3131
"chart.js": "^2.9.4",
3232
"jest-canvas-mock": "^2.3.0",
33-
"stimulus": "^2.0.0"
33+
"@hotwired/stimulus": "^3.0.0"
3434
},
3535
"jest": {
3636
"testRegex": "test/.*\\.test.js",

src/Chartjs/Resources/assets/src/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Controller } from 'stimulus';
12+
import { Controller } from '@hotwired/stimulus';
1313
import { Chart } from 'chart.js';
1414

1515
export default class extends Controller {

src/Chartjs/Resources/assets/test/controller.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Application, Controller } from 'stimulus';
12+
import { Application, Controller } from '@hotwired/stimulus';
1313
import { getByTestId, waitFor } from '@testing-library/dom';
1414
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1515
import ChartjsController from '../dist/controller';

src/Cropperjs/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# CHANGELOG
22

3+
## 2.0
4+
5+
- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
6+
version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
7+
for more details.
8+
39
## 1.3
410

511
- [DEPENDENCY CHANGE] `cropperjs` is no longer included automatically (#93)

src/Cropperjs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ Symfony UX Cropper.js allows you to extend its default behavior using a custom S
126126
```js
127127
// mycropper_controller.js
128128

129-
import { Controller } from 'stimulus';
129+
import { Controller } from '@hotwired/stimulus';
130130

131131
export default class extends Controller {
132132
connect() {

src/Cropperjs/Resources/assets/dist/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", {
1515
});
1616
exports["default"] = void 0;
1717

18-
var _stimulus = require("stimulus");
18+
var _stimulus = require("@hotwired/stimulus");
1919

2020
var _cropperjs = _interopRequireDefault(require("cropperjs"));
2121

@@ -37,7 +37,7 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
3737

3838
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3939

40-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
40+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
4141

4242
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
4343

src/Cropperjs/Resources/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
},
2525
"peerDependencies": {
2626
"cropperjs": "^1.5.9",
27-
"stimulus": "^2.0.0"
27+
"@hotwired/stimulus": "^3.0.0"
2828
},
2929
"devDependencies": {
3030
"@babel/cli": "^7.12.1",
@@ -33,7 +33,7 @@
3333
"@babel/preset-env": "^7.12.7",
3434
"@symfony/stimulus-testing": "^1.1.0",
3535
"cropperjs": "^1.5.9",
36-
"stimulus": "^2.0.0"
36+
"@hotwired/stimulus": "^3.0.0"
3737
},
3838
"jest": {
3939
"testRegex": "test/.*\\.test.js",

src/Cropperjs/Resources/assets/src/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Controller } from 'stimulus';
12+
import { Controller } from '@hotwired/stimulus';
1313
import Cropper from 'cropperjs';
1414

1515
export default class extends Controller {

src/Cropperjs/Resources/assets/test/controller.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Application, Controller } from 'stimulus';
12+
import { Application, Controller } from '@hotwired/stimulus';
1313
import { getByTestId, waitFor } from '@testing-library/dom';
1414
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1515
import CropperjsController from '../dist/controller';

src/Dropzone/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CHANGELOG
2+
3+
## 2.0
4+
5+
- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
6+
version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
7+
for more details.

src/Dropzone/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ Symfony UX Dropzone allows you to extend its default behavior using a custom Sti
8585
```js
8686
// mydropzone_controller.js
8787

88-
import { Controller } from 'stimulus';
88+
import { Controller } from '@hotwired/stimulus';
8989

9090
export default class extends Controller {
9191
connect() {

src/Dropzone/Resources/assets/dist/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", {
1515
});
1616
exports["default"] = void 0;
1717

18-
var _stimulus = require("stimulus");
18+
var _stimulus = require("@hotwired/stimulus");
1919

2020
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2121

@@ -33,7 +33,7 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
3333

3434
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3535

36-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
36+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3737

3838
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3939

src/Dropzone/Resources/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@
2222
"lint": "eslint src test"
2323
},
2424
"peerDependencies": {
25-
"stimulus": "^2.0.0"
25+
"@hotwired/stimulus": "^3.0.0"
2626
},
2727
"devDependencies": {
2828
"@babel/cli": "^7.12.1",
2929
"@babel/core": "^7.12.3",
3030
"@babel/plugin-proposal-class-properties": "^7.12.1",
3131
"@babel/preset-env": "^7.12.7",
3232
"@symfony/stimulus-testing": "^1.1.0",
33-
"stimulus": "^2.0.0"
33+
"@hotwired/stimulus": "^3.0.0"
3434
},
3535
"jest": {
3636
"testRegex": "test/.*\\.test.js",

src/Dropzone/Resources/assets/src/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Controller } from 'stimulus';
12+
import { Controller } from '@hotwired/stimulus';
1313

1414
export default class extends Controller {
1515
static targets = ['input', 'placeholder', 'preview', 'previewClearButton', 'previewFilename', 'previewImage'];

src/Dropzone/Resources/assets/test/controller.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Application, Controller } from 'stimulus';
12+
import { Application, Controller } from '@hotwired/stimulus';
1313
import { getByTestId, waitFor } from '@testing-library/dom';
1414
import user from '@testing-library/user-event';
1515
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';

src/LazyImage/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# CHANGELOG
2+
3+
## 2.0
4+
5+
- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
6+
version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
7+
for more details.

src/LazyImage/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Symfony UX LazyImage allows you to extend its default behavior using a custom St
7878
```js
7979
// mylazyimage_controller.js
8080

81-
import { Controller } from 'stimulus';
81+
import { Controller } from '@hotwired/stimulus';
8282

8383
export default class extends Controller {
8484
connect() {

src/LazyImage/Resources/assets/dist/controller.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "__esModule", {
1515
});
1616
exports["default"] = void 0;
1717

18-
var _stimulus = require("stimulus");
18+
var _stimulus = require("@hotwired/stimulus");
1919

2020
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2121

@@ -33,7 +33,7 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
3333

3434
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
3535

36-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
36+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
3737

3838
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
3939

src/LazyImage/Resources/assets/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@
1919
"lint": "eslint src test"
2020
},
2121
"peerDependencies": {
22-
"stimulus": "^2.0.0"
22+
"@hotwired/stimulus": "^3.0.0"
2323
},
2424
"devDependencies": {
2525
"@babel/cli": "^7.12.1",
2626
"@babel/core": "^7.12.3",
2727
"@babel/plugin-proposal-class-properties": "^7.12.1",
2828
"@babel/preset-env": "^7.12.7",
2929
"@symfony/stimulus-testing": "^1.1.0",
30-
"stimulus": "^2.0.0"
30+
"@hotwired/stimulus": "^3.0.0"
3131
},
3232
"jest": {
3333
"testRegex": "test/.*\\.test.js",

src/LazyImage/Resources/assets/src/controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Controller } from 'stimulus';
12+
import { Controller } from '@hotwired/stimulus';
1313

1414
export default class extends Controller {
1515
connect() {

src/LazyImage/Resources/assets/test/controller.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
'use strict';
1111

12-
import { Application, Controller } from 'stimulus';
12+
import { Application, Controller } from '@hotwired/stimulus';
1313
import { getByTestId, waitFor } from '@testing-library/dom';
1414
import { clearDOM, mountDOM } from '@symfony/stimulus-testing';
1515
import LazyImageController from '../dist/controller';

src/LiveComponent/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
## NEXT
44

5+
- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
6+
version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
7+
for more details.
8+
59
- Require live components have a default action (`__invoke()` by default) to enable
610
controller annotations/attributes (ie `@Security/@Cache`). Added `DefaultActionTrait`
711
helper.

0 commit comments

Comments
 (0)