Compare commits

..

129 Commits

Author SHA1 Message Date
94303c92e6 Add a validator on URL entity 2023-08-29 14:17:53 +02:00
ec4d23b584 Merge pull request #6899 from wallabag/fix/google-mailer
Add Google mailer
2023-08-29 09:34:39 +02:00
c0414355aa Merge pull request #6897 from Simounet/fix/checkboxes-pointer-events-bis
Fix checkboxes pointer events issue
2023-08-28 18:01:48 +02:00
aaf4ab2d2a Add Google mailer
SMTP is the default provider to send email.
But users tend to use Gmail from time to time. So, instead of a complex installation to allow it, we prefer to ship it with the default package.

Also:
- update deps globally
- lock symfony/* deps to 4.4
2023-08-28 18:01:09 +02:00
56983b01a8 Fix checkboxes pointer events issue 2023-08-28 14:21:34 +02:00
6b7e9ec1df Merge pull request #6896 from wallabag/prepare-265
Prepare wallabag 2.6.5
2023-08-28 10:22:14 +02:00
f052f6f580 Prepare wallabag 2.6.5 2023-08-28 10:14:40 +02:00
16a92c54a7 Update j0k3r/graby-site-config 2023-08-28 10:08:09 +02:00
13b2752e8d Autocapitalize disabled for domain input filter 2023-08-28 09:54:51 +02:00
634997c9b5 Good HTML type for HTTP status input filter 2023-08-28 09:54:45 +02:00
ca608ece65 Fix nav input styles 2023-08-28 09:54:12 +02:00
027042cc1a Fix #6873 override materializecss checkbox pointer-events disabled 2023-08-28 09:53:56 +02:00
cf9243151a Merge pull request #6871 from wallabag/prepare-264
Prepare wallabag 2.6.4
2023-08-22 15:43:27 +02:00
e9a837a0ac Prepare wallabag 2.6.4 2023-08-22 15:37:04 +02:00
abef36fd2b Merge pull request #6869 from wallabag/fix-api-token
Fix API token generation
2023-08-22 15:32:39 +02:00
2f86dd9c73 Fix API token generation 2023-08-22 13:35:27 +02:00
3d22442f8c Merge pull request #6864 from wallabag/fix-checkbox
Fix checkboxes which were broken
2023-08-21 15:34:58 +02:00
c99a733aff Fix checkboxes which were broken 2023-08-21 14:12:06 +02:00
85065b509f Merge pull request #6862 from wallabag/prepare-263
Prepare wallabag 2.6.3
2023-08-21 11:57:10 +02:00
ca879c36de Prepare wallabag 2.6.3 2023-08-21 11:52:16 +02:00
ffcc5c9062 Merge pull request from GHSA-gjvc-55fw-v6vq
Replace GET way to POST way to delete API client
2023-08-21 11:08:47 +02:00
78b0b55c40 Merge pull request from GHSA-p8gp-899c-jvq9
Replace GET way to POST way to reset data user
2023-08-21 11:08:24 +02:00
94a6bc0dad Merge pull request #6806 from wallabag/dependabot/composer/craue/config-bundle-2.7.0
Bump craue/config-bundle from 2.6.0 to 2.7.0
2023-08-21 10:57:10 +02:00
383dcc5c45 Merge pull request #6119 from Spoons/feat_referer_to_session_redirect
Fix: Use Session instead of Referrer for Redirection
2023-08-21 10:32:03 +02:00
de5aa004cb Bump craue/config-bundle from 2.6.0 to 2.7.0
Bumps [craue/config-bundle](https://github.com/craue/CraueConfigBundle) from 2.6.0 to 2.7.0.
- [Changelog](https://github.com/craue/CraueConfigBundle/blob/master/CHANGELOG.md)
- [Commits](https://github.com/craue/CraueConfigBundle/compare/2.6.0...2.7.0)

---
updated-dependencies:
- dependency-name: craue/config-bundle
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 09:38:54 +02:00
dca910e2a6 Merge pull request #6860 from wallabag/dependabot/npm_and_yarn/sass-1.66.1
Bump sass from 1.65.1 to 1.66.1
2023-08-21 03:08:38 +00:00
bc491e3712 Bump sass from 1.65.1 to 1.66.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.65.1 to 1.66.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.65.1...1.66.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 03:01:00 +00:00
40d7ca11da Merge pull request #6859 from wallabag/dependabot/npm_and_yarn/postcss-scss-4.0.7
Bump postcss-scss from 4.0.6 to 4.0.7
2023-08-21 02:59:43 +00:00
89d38b23e0 Merge pull request #6861 from wallabag/dependabot/npm_and_yarn/stylelint-15.10.3
Bump stylelint from 15.10.2 to 15.10.3
2023-08-21 02:57:59 +00:00
7be1a4e1b2 Merge pull request #6858 from wallabag/dependabot/npm_and_yarn/eslint-plugin-import-2.28.1
Bump eslint-plugin-import from 2.28.0 to 2.28.1
2023-08-21 02:44:22 +00:00
4d890868ed Bump postcss-scss from 4.0.6 to 4.0.7
Bumps [postcss-scss](https://github.com/postcss/postcss-scss) from 4.0.6 to 4.0.7.
- [Changelog](https://github.com/postcss/postcss-scss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-scss/compare/4.0.6...4.0.7)

---
updated-dependencies:
- dependency-name: postcss-scss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 02:42:50 +00:00
1d0200c5b9 Bump stylelint from 15.10.2 to 15.10.3
Bumps [stylelint](https://github.com/stylelint/stylelint) from 15.10.2 to 15.10.3.
- [Release notes](https://github.com/stylelint/stylelint/releases)
- [Changelog](https://github.com/stylelint/stylelint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/stylelint/stylelint/compare/15.10.2...15.10.3)

---
updated-dependencies:
- dependency-name: stylelint
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 02:42:47 +00:00
6a5e7dba89 Merge pull request #6857 from wallabag/dependabot/npm_and_yarn/postcss-8.4.28
Bump postcss from 8.4.27 to 8.4.28
2023-08-21 02:41:38 +00:00
6f23eba62d Bump eslint-plugin-import from 2.28.0 to 2.28.1
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.28.0 to 2.28.1.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.28.0...v2.28.1)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 02:36:30 +00:00
d87237484c Bump postcss from 8.4.27 to 8.4.28
Bumps [postcss](https://github.com/postcss/postcss) from 8.4.27 to 8.4.28.
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.27...8.4.28)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-21 02:36:22 +00:00
46ebbfc9a4 Merge pull request #6788 from wallabag/add-git-check
Add check if git is installed
2023-08-19 16:11:11 +02:00
8ee95437a0 Fix typo 2023-08-19 07:18:13 +02:00
ef5b43f55c Add check if git is installed
Fix #3589
2023-08-19 07:17:06 +02:00
a465db607f Merge pull request #6842 from wallabag/dependabot/npm_and_yarn/eslint-8.47.0
Bump eslint from 8.46.0 to 8.47.0
2023-08-14 03:36:07 +00:00
985c7add1d Bump eslint from 8.46.0 to 8.47.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.47.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.47.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:30:45 +00:00
3d9986d6fc Merge pull request #6841 from wallabag/dependabot/npm_and_yarn/babel/core-7.22.10
Bump @babel/core from 7.22.9 to 7.22.10
2023-08-14 03:29:22 +00:00
4b7a6eaf39 Bump @babel/core from 7.22.9 to 7.22.10
Bumps [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/packages/babel-core)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:20:56 +00:00
3e8cc92dcd Merge pull request #6844 from wallabag/dependabot/npm_and_yarn/autoprefixer-10.4.15
Bump autoprefixer from 10.4.14 to 10.4.15
2023-08-14 03:19:49 +00:00
6172071a64 Bump autoprefixer from 10.4.14 to 10.4.15
Bumps [autoprefixer](https://github.com/postcss/autoprefixer) from 10.4.14 to 10.4.15.
- [Release notes](https://github.com/postcss/autoprefixer/releases)
- [Changelog](https://github.com/postcss/autoprefixer/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/autoprefixer/compare/10.4.14...10.4.15)

---
updated-dependencies:
- dependency-name: autoprefixer
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 03:10:09 +00:00
cf3adbfaea Merge pull request #6845 from wallabag/dependabot/npm_and_yarn/babel/preset-env-7.22.10
Bump @babel/preset-env from 7.22.9 to 7.22.10
2023-08-14 03:08:59 +00:00
24e6311c05 Merge pull request #6843 from wallabag/dependabot/npm_and_yarn/stylelint-scss-5.1.0
Bump stylelint-scss from 5.0.1 to 5.1.0
2023-08-14 02:59:06 +00:00
69b96fe179 Bump @babel/preset-env from 7.22.9 to 7.22.10
Bumps [@babel/preset-env](https://github.com/babel/babel/tree/HEAD/packages/babel-preset-env) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/packages/babel-preset-env)

---
updated-dependencies:
- dependency-name: "@babel/preset-env"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 02:51:35 +00:00
ffa2e68c5f Merge pull request #6840 from wallabag/dependabot/npm_and_yarn/babel/eslint-parser-7.22.10
Bump @babel/eslint-parser from 7.22.9 to 7.22.10
2023-08-14 02:50:24 +00:00
b338c68945 Merge pull request #6839 from wallabag/dependabot/npm_and_yarn/sass-1.65.1
Bump sass from 1.64.2 to 1.65.1
2023-08-14 02:47:30 +00:00
f67486a6df Bump stylelint-scss from 5.0.1 to 5.1.0
Bumps [stylelint-scss](https://github.com/stylelint-scss/stylelint-scss) from 5.0.1 to 5.1.0.
- [Release notes](https://github.com/stylelint-scss/stylelint-scss/releases)
- [Changelog](https://github.com/stylelint-scss/stylelint-scss/blob/master/CHANGELOG.md)
- [Commits](https://github.com/stylelint-scss/stylelint-scss/compare/v5.0.1...v5.1.0)

---
updated-dependencies:
- dependency-name: stylelint-scss
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 02:43:55 +00:00
33c72bb9fc Bump @babel/eslint-parser from 7.22.9 to 7.22.10
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.22.9 to 7.22.10.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.22.10/eslint/babel-eslint-parser)

---
updated-dependencies:
- dependency-name: "@babel/eslint-parser"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 02:43:07 +00:00
78dc311c72 Bump sass from 1.64.2 to 1.65.1
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.2 to 1.65.1.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.2...1.65.1)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-14 02:42:52 +00:00
48226ad6e5 Merge pull request #6809 from yguedidi/replace-kernel.root_dir-by-kernel.project_dir
Replace kernel.root_dir by kernel.project_dir
2023-08-13 20:02:06 +02:00
f33d1f8e48 Merge pull request #6829 from wallabag/impr/css-content
css: reduce risk of collision for #content
2023-08-13 18:03:17 +02:00
97810f7335 css: rebuild assets
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-08-13 00:09:59 +02:00
15230f488a css: reduce risk of collision for #content
`main #content` can match fetched content and break the layout, like for
technologyreview.com

Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-08-13 00:08:39 +02:00
89ca32e705 Merge pull request #6817 from yguedidi/split-symfony/symfony
Split symfony/symfony
2023-08-11 22:03:53 +02:00
a71d95e38a Merge pull request #6826 from weblate/weblate-wallabag-messages
Translations update from Hosted Weblate
2023-08-11 20:55:44 +02:00
fa2e1d933f Translated using Weblate (Croatian)
Currently translated at 100.0% (582 of 582 strings)
2023-08-11 14:47:40 +02:00
181fe7e1e9 Translated using Weblate (Polish)
Currently translated at 100.0% (582 of 582 strings)
2023-08-11 14:47:39 +02:00
905d61eb49 Merge pull request #6824 from wallabag/dependabot/composer/doctrine/orm-2.16.1
Bump doctrine/orm from 2.15.4 to 2.16.1
2023-08-10 08:07:08 +02:00
c78f2706c9 Bump doctrine/orm from 2.15.4 to 2.16.1
Bumps [doctrine/orm](https://github.com/doctrine/orm) from 2.15.4 to 2.16.1.
- [Release notes](https://github.com/doctrine/orm/releases)
- [Commits](https://github.com/doctrine/orm/compare/2.15.4...2.16.1)

---
updated-dependencies:
- dependency-name: doctrine/orm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 07:57:48 +02:00
dbbb5f3cfb Merge pull request #6825 from wallabag/dependabot/composer/phpstan/phpstan-doctrine-1.3.42
Bump phpstan/phpstan-doctrine from 1.3.41 to 1.3.42
2023-08-10 07:57:27 +02:00
33d22c149b Bump phpstan/phpstan-doctrine from 1.3.41 to 1.3.42
Bumps [phpstan/phpstan-doctrine](https://github.com/phpstan/phpstan-doctrine) from 1.3.41 to 1.3.42.
- [Release notes](https://github.com/phpstan/phpstan-doctrine/releases)
- [Commits](https://github.com/phpstan/phpstan-doctrine/compare/1.3.41...1.3.42)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-doctrine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-10 02:06:55 +00:00
cc33fcb4ba Replace kernel.root_dir by kernel.project_dir 2023-08-09 22:46:18 +01:00
24db3d6862 Split symfony/symfony 2023-08-09 21:51:49 +01:00
c3d1f92278 Replace GET way to POST way to delete API client 2023-08-09 21:54:40 +02:00
a9893d754f Replace GET way to POST way to reset data user
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
2023-08-09 21:39:03 +02:00
f4fd8e4675 Merge pull request #6778 from wallabag/add-confirmation-before-reload
Add confirmation before reload entry
2023-08-09 19:40:49 +02:00
0ccbd653fa Merge pull request #6812 from yguedidi/make-crawler-extract-get-an-array
Make Crawler::extract get an array
2023-08-09 11:03:03 +02:00
70452cfc3f Merge pull request #6820 from wallabag/dependabot/composer/phpstan/phpstan-doctrine-1.3.41
Bump phpstan/phpstan-doctrine from 1.3.40 to 1.3.41
2023-08-09 07:54:32 +02:00
826e310687 Bump phpstan/phpstan-doctrine from 1.3.40 to 1.3.41
Bumps [phpstan/phpstan-doctrine](https://github.com/phpstan/phpstan-doctrine) from 1.3.40 to 1.3.41.
- [Release notes](https://github.com/phpstan/phpstan-doctrine/releases)
- [Commits](https://github.com/phpstan/phpstan-doctrine/compare/1.3.40...1.3.41)

---
updated-dependencies:
- dependency-name: phpstan/phpstan-doctrine
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 07:45:44 +02:00
b81054697b Merge pull request #6819 from wallabag/dependabot/composer/phpstan/phpstan-1.10.28
Bump phpstan/phpstan from 1.10.27 to 1.10.28
2023-08-09 07:45:15 +02:00
ddd8754a11 Bump phpstan/phpstan from 1.10.27 to 1.10.28
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.27 to 1.10.28.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.27...1.10.28)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-09 02:24:32 +00:00
ac1c1ff571 Merge pull request #6816 from yguedidi/use-psr-17-and-psr-18
Use PSR-17 and PSR-18
2023-08-08 23:56:10 +02:00
815158fefa Merge pull request #6813 from yguedidi/replace-client-by-kernelbrowser
Replace Client by KernelBrowser
2023-08-08 23:36:06 +02:00
e1928c78ff Merge pull request #6810 from yguedidi/replace-debug-component-by-errorhandler-component
Replace Debug component by ErrorHandler component
2023-08-08 23:28:13 +02:00
65915004e0 Merge pull request #6808 from yguedidi/make-importcontroller-extends-abstractcontroller
Make ImportController extends AbstractController
2023-08-08 23:26:37 +02:00
60cb8c0294 Merge pull request #6797 from yguedidi/use-twig-instead-of-templating
Use Twig instead of templating
2023-08-08 23:18:16 +02:00
f6e85e88af Merge pull request #6799 from yguedidi/identify-platforms-by-their-class
Identify platforms by their class
2023-08-08 23:04:42 +02:00
a4b0a01b6d Merge pull request #6798 from yguedidi/add-mandatory-$class-parameter
Add mandatory $class parameter
2023-08-08 22:59:16 +02:00
1bed15fd9b Merge pull request #6800 from yguedidi/move-from-transchoice-to-trans
Move from transchoice to trans
2023-08-08 22:57:48 +02:00
59860d9526 Merge pull request #6794 from wallabag/dependabot/composer/guzzlehttp/psr7-2.6.0
Bump guzzlehttp/psr7 from 2.5.0 to 2.6.0
2023-08-08 16:54:46 +02:00
807d473564 Merge pull request #6811 from yguedidi/replace-getresponseevent-by-requestevent
Replace GetResponseEvent by RequestEvent
2023-08-08 16:53:18 +02:00
ed17e61db2 Merge pull request #6803 from yguedidi/ensure-the-kernel-is-shut-down-before-calling-createclient
Ensure the kernel is shut down before calling createClient
2023-08-08 16:51:44 +02:00
6159c92f27 Merge pull request #6814 from yguedidi/ignore-docker-compose.override.yml
Ignore docker-compose.override.yml
2023-08-08 08:17:42 +02:00
bf176121c4 Use PSR-17 and PSR-18 2023-08-08 03:25:27 +01:00
ec33ec14e5 Replace Client by KernelBrowser 2023-08-08 02:55:35 +01:00
2aa7e7e121 Ignore docker-compose.override.yml 2023-08-08 01:35:52 +01:00
093003d9af Make Crawler::extract get an array 2023-08-07 22:51:18 +01:00
58a0ca2622 Replace GetResponseEvent by RequestEvent 2023-08-07 22:34:47 +01:00
1ba1ed23f1 Replace Debug component by ErrorHandler component 2023-08-07 22:29:48 +01:00
7beb535b7a Make ImportController extends AbstractController 2023-08-07 22:04:13 +01:00
9870785d59 Merge pull request #6805 from wallabag/dependabot/composer/phpstan/phpstan-1.10.27
Bump phpstan/phpstan from 1.10.26 to 1.10.27
2023-08-07 07:08:51 +02:00
53a2874351 Bump phpstan/phpstan from 1.10.26 to 1.10.27
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.10.26 to 1.10.27.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Changelog](https://github.com/phpstan/phpstan/blob/1.11.x/CHANGELOG.md)
- [Commits](https://github.com/phpstan/phpstan/compare/1.10.26...1.10.27)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 02:27:25 +00:00
bb6b9f9f05 Merge pull request #6804 from wallabag/dependabot/npm_and_yarn/sass-1.64.2
Bump sass from 1.64.1 to 1.64.2
2023-08-07 02:25:08 +00:00
526ef23e1a Bump sass from 1.64.1 to 1.64.2
Bumps [sass](https://github.com/sass/dart-sass) from 1.64.1 to 1.64.2.
- [Release notes](https://github.com/sass/dart-sass/releases)
- [Changelog](https://github.com/sass/dart-sass/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sass/dart-sass/compare/1.64.1...1.64.2)

---
updated-dependencies:
- dependency-name: sass
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-07 02:19:52 +00:00
8d3d916d4a Remove extraneous blank lines from EntryController.php 2023-08-06 15:48:28 -05:00
e90daf0690 Update TagController.php 2023-08-06 20:20:35 +00:00
9729db75de Update EntryController.php 2023-08-06 20:19:49 +00:00
ced2ea4015 Merge branch 'master' into feat_referer_to_session_redirect 2023-08-06 20:14:44 +00:00
7d78e2ae06 Ensure the kernel is shut down before calling createClient 2023-08-06 13:48:53 +01:00
f43d8fa947 Move from transchoice to trans 2023-08-05 23:39:13 +01:00
f48f982025 Identify platforms by their class 2023-08-05 18:35:09 +01:00
667ea14d42 Add mandatory $class parameter 2023-08-05 17:25:03 +01:00
e93fdca2d3 Use Twig instead of templating 2023-08-05 16:43:36 +01:00
fcf6d3c3f8 Bump guzzlehttp/psr7 from 2.5.0 to 2.6.0
Bumps [guzzlehttp/psr7](https://github.com/guzzle/psr7) from 2.5.0 to 2.6.0.
- [Release notes](https://github.com/guzzle/psr7/releases)
- [Changelog](https://github.com/guzzle/psr7/blob/2.6/CHANGELOG.md)
- [Commits](https://github.com/guzzle/psr7/compare/2.5.0...2.6.0)

---
updated-dependencies:
- dependency-name: guzzlehttp/psr7
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-04 02:40:33 +00:00
c2bfc0f359 Merge pull request #6786 from wallabag/dependabot/composer/sentry/sentry-symfony-4.10.0
Bump sentry/sentry-symfony from 4.9.2 to 4.10.0
2023-08-03 11:26:02 +02:00
8281920f2c Merge pull request #6775 from viktoriussuwandi/issue#6772
Remove external dependencies on src/Wallabag/CoreBundle/Resources/vie…
2023-08-02 23:14:13 +02:00
d4913c50c2 Bump sentry/sentry-symfony from 4.9.2 to 4.10.0
Bumps [sentry/sentry-symfony](https://github.com/getsentry/sentry-symfony) from 4.9.2 to 4.10.0.
- [Release notes](https://github.com/getsentry/sentry-symfony/releases)
- [Changelog](https://github.com/getsentry/sentry-symfony/blob/master/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-symfony/compare/4.9.2...4.10.0)

---
updated-dependencies:
- dependency-name: sentry/sentry-symfony
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-02 02:10:33 +00:00
19d3e878cf Merge branch 'master' into issue#6772 2023-08-01 19:43:37 +07:00
c659a42c51 Merge pull request #6783 from wallabag/fix-dependencies
Update dependencies
2023-07-31 15:38:43 +02:00
cb411e8dcd Update dependencies 2023-07-31 14:58:29 +02:00
fec8a993d9 Merge pull request #6779 from wallabag/dependabot/composer/jms/serializer-3.27.0
Bump jms/serializer from 3.26.0 to 3.27.0
2023-07-31 11:46:58 +02:00
31542bc4b1 Merge branch 'master' into dependabot/composer/jms/serializer-3.27.0 2023-07-31 11:36:39 +02:00
827dded754 Merge pull request #6780 from wallabag/dependabot/composer/symfony/phpunit-bridge-6.3.2
Bump symfony/phpunit-bridge from 6.3.1 to 6.3.2
2023-07-31 11:36:18 +02:00
39bcddfd8b Merge branch 'master' into dependabot/composer/symfony/phpunit-bridge-6.3.2 2023-07-31 11:29:08 +02:00
8cfa1cd551 Merge pull request #6782 from wallabag/dependabot/npm_and_yarn/eslint-8.46.0
Bump eslint from 8.45.0 to 8.46.0
2023-07-31 02:38:17 +00:00
649e1e56a9 Bump eslint from 8.45.0 to 8.46.0
Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 02:33:21 +00:00
c1ed66aad5 Merge pull request #6781 from wallabag/dependabot/npm_and_yarn/eslint-plugin-import-2.28.0
Bump eslint-plugin-import from 2.27.5 to 2.28.0
2023-07-31 02:32:20 +00:00
9beadfde59 Bump eslint-plugin-import from 2.27.5 to 2.28.0
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.27.5 to 2.28.0.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.27.5...v2.28.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 02:27:52 +00:00
090f873ffc Bump symfony/phpunit-bridge from 6.3.1 to 6.3.2
Bumps [symfony/phpunit-bridge](https://github.com/symfony/phpunit-bridge) from 6.3.1 to 6.3.2.
- [Release notes](https://github.com/symfony/phpunit-bridge/releases)
- [Changelog](https://github.com/symfony/phpunit-bridge/blob/6.3/CHANGELOG.md)
- [Commits](https://github.com/symfony/phpunit-bridge/compare/v6.3.1...v6.3.2)

---
updated-dependencies:
- dependency-name: symfony/phpunit-bridge
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 02:14:05 +00:00
1b7d756be0 Bump jms/serializer from 3.26.0 to 3.27.0
Bumps [jms/serializer](https://github.com/schmittjoh/serializer) from 3.26.0 to 3.27.0.
- [Release notes](https://github.com/schmittjoh/serializer/releases)
- [Changelog](https://github.com/schmittjoh/serializer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/schmittjoh/serializer/compare/3.26.0...3.27.0)

---
updated-dependencies:
- dependency-name: jms/serializer
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-31 02:13:54 +00:00
d6f63d5d51 Add confirmation before reload entry 2023-07-30 20:07:24 +02:00
c1cba72a19 Replace hardcoded url by current wallabag url 2023-07-30 10:09:54 +02:00
e80a169435 Remove external dependencies on src/Wallabag/CoreBundle/Resources/views/Developer/howto_app.html.twig 2023-07-30 14:07:45 +07:00
97fee36fa6 Update src/Wallabag/CoreBundle/Controller/TagController.php
Co-authored-by: Jérémy Benoist <j0k3r@users.noreply.github.com>
2022-12-23 11:03:25 -06:00
fbccae8a79 fix: update remove tag test to accept root relative urls 2022-12-10 11:52:18 -06:00
13bd448e01 feat: use session instead of referer for redirects 2022-12-04 16:20:11 -06:00
653 changed files with 3987 additions and 4591 deletions

77
.env
View File

@ -1,77 +0,0 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
DOMAIN_NAME=https://your-wallabag-instance.wallabag.org
SERVER_NAME="Your wallabag instance"
# two factor stuff
TWOFACTOR_AUTH=true
TWOFACTOR_SENDER=no-reply@wallabag.org
# fosuser stuff
FOSUSER_REGISTRATION=true
FOSUSER_CONFIRMATION=true
# how long the access token should live in seconds for the API
FOS_OAUTH_SERVER_ACCESS_TOKEN_LIFETIME=3600
# how long the refresh token should life in seconds for the API
FOS_OAUTH_SERVER_REFRESH_TOKEN_LIFETIME=1209600
FROM_EMAIL=no-reply@wallabag.org
RSS_LIMIT=50
LOCALE=en
DATABASE_TABLE_PREFIX=wallabag_
# redis stuff
REDIS_SCHEME=tcp
REDIS_HOST=localhost
REDIS_PORT=6379
REDIS_PATH=null
REDIS_PASSWORD=null
###> doctrine/doctrine-bundle ###
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
#
DATABASE_URL="sqlite:///%kernel.project_dir%/data/db/wallabag.sqlite"
# DATABASE_URL="mysql://root:@127.0.0.1:3306/wallabag?serverVersion=8&charset=utf8mb4"
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8"
###< doctrine/doctrine-bundle ###
###> nelmio/cors-bundle ###
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'
###< nelmio/cors-bundle ###
###> php-amqplib/rabbitmq-bundle ###
RABBITMQ_URL=amqp://guest:guest@localhost:5672
###< php-amqplib/rabbitmq-bundle ###
###> sentry/sentry-symfony ###
SENTRY_DSN=
###< sentry/sentry-symfony ###
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=b6b54475f34a3238dec16508c4903ca0
#TRUSTED_PROXIES=127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
#TRUSTED_HOSTS='^(localhost|example\.com)$'
###< symfony/framework-bundle ###
###> symfony/mailer ###
MAILER_DSN=smtp://127.0.0.1
###< symfony/mailer ###

View File

@ -1,7 +0,0 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="mysql://root:root@127.0.0.1:3306/wallabag_test?serverVersion=8&charset=utf8mb4"

View File

@ -1,7 +0,0 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="mysql://root:root@127.0.0.1:3306/wallabag_test?serverVersion=8&charset=utf8mb4"

View File

@ -1,7 +0,0 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="postgresql://wallabag:wallabagrocks@localhost:5432/wallabag_test?serverVersion=14&charset=utf8"

View File

@ -1,7 +0,0 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="sqlite:///%test_database_path%"

1
.gitattributes vendored
View File

@ -3,6 +3,5 @@
/.github export-ignore /.github export-ignore
/.gitignore export-ignore /.gitignore export-ignore
/phpstan.neon export-ignore /phpstan.neon export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml.dist export-ignore /phpunit.xml.dist export-ignore
/tests export-ignore /tests export-ignore

View File

@ -5,7 +5,7 @@ on:
push: push:
branches: branches:
- master - master
- 2.* - "2.**"
permissions: permissions:
contents: read contents: read

View File

@ -5,7 +5,7 @@ on:
push: push:
branches: branches:
- master - master
- 2.* - "2.**"
permissions: permissions:
contents: read contents: read
@ -48,7 +48,7 @@ jobs:
run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr" run: "php bin/phpstan analyse --no-progress --error-format=checkstyle | cs2pr"
- name: "Run TwigCS" - name: "Run TwigCS"
run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle templates/ | cs2pr" run: "php bin/twigcs --severity=error --display=blocking --reporter checkstyle app/ src/ | cs2pr"
- name: "Run ergebnis/composer-normalize" - name: "Run ergebnis/composer-normalize"
run: "composer normalize --dry-run --no-check-lock" run: "composer normalize --dry-run --no-check-lock"

View File

@ -5,7 +5,7 @@ on:
push: push:
branches: branches:
- master - master
- 2.* - "2.**"
env: env:
PGPASSWORD: wallabagrocks PGPASSWORD: wallabagrocks

View File

@ -5,7 +5,7 @@ on:
push: push:
branches: branches:
- master - master
- 2.* - "2.**"
permissions: permissions:
contents: read contents: read

View File

@ -23,7 +23,7 @@ jobs:
with: with:
coverage: "none" coverage: "none"
php-version: "${{ matrix.php }}" php-version: "${{ matrix.php }}"
tools: pecl tools: pecl, composer:2.2
extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy extensions: pdo, pdo_mysql, pdo_sqlite, pdo_pgsql, curl, imagick, pgsql, gd, tidy
ini-values: "date.timezone=Europe/Paris" ini-values: "date.timezone=Europe/Paris"
env: env:

53
.gitignore vendored
View File

@ -1,27 +1,35 @@
# Cache, log & sessions # Cache, logs & sessions
/var/* /var/*
!/var/cache !/var/cache
/var/cache/* /var/cache/*
!var/cache/.gitkeep !var/cache/.gitkeep
!/var/log !/var/logs
/var/log/* /var/logs/*
!var/log/.gitkeep !var/logs/.gitkeep
!/var/sessions !/var/sessions
/var/sessions/* /var/sessions/*
!var/sessions/.gitkeep !var/sessions/.gitkeep
/bin/* /bin/*
!/bin/console !/bin/console
.php-cs-fixer.php
.php-cs-fixer.cache
.phpunit.result.cache
phpunit.xml
docker-compose.override.yml
# Parameters # Parameters
/app/config/parameters.yml /app/config/parameters.yml
# Managed by Composer
/vendor/
# Assets and user uploads # Assets and user uploads
public/uploads/ web/uploads/
/public/bundles/* /web/bundles/*
!/public/bundles/.gitkeep !/web/bundles/.gitkeep
/public/assets/images/* /web/assets/images/*
!public/assets/images/.gitkeep !web/assets/images/.gitkeep
/public/wallassets/*.dev.js /web/wallassets/*.dev.js
# Build # Build
/app/build /app/build
@ -40,6 +48,9 @@ data/db/wallabag*.sqlite
# assets stuff # assets stuff
node_modules/ node_modules/
bin bin
app/Resources/build/
!/src/Wallabag/CoreBundle/Resources/public
/src/Wallabag/CoreBundle/Resources/public/*
# Test-generated files # Test-generated files
admin-export.json admin-export.json
@ -47,24 +58,4 @@ specialexport.json
/data/site-credentials-secret-key.txt /data/site-credentials-secret-key.txt
# Custom CSS file # Custom CSS file
public/custom.css web/custom.css
###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.php
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

View File

@ -1,5 +1,54 @@
# Changelog # Changelog
## [2.6.5](https://github.com/wallabag/wallabag/tree/2.6.5)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.4...2.6.5)
### Fixes
* "Fix checkboxes pointer-events disabled" by @Simounet https://github.com/wallabag/wallabag/pull/6874
* "Fix nav input styles" by @Simounet https://github.com/wallabag/wallabag/pull/6877
* "Change domain status filters html types" by @Simounet https://github.com/wallabag/wallabag/pull/6888
## [2.6.4](https://github.com/wallabag/wallabag/tree/2.6.4)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.3...2.6.4)
### Fixes
* Fix API token generation by @nicosomb https://github.com/wallabag/wallabag/pull/6869
* Fix checkboxes which were broken by @nicosomb https://github.com/wallabag/wallabag/pull/6864
## [2.6.3](https://github.com/wallabag/wallabag/tree/2.6.3)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.2...2.6.3)
### Security fixes
* Replace GET way to POST way to reset data user by @nicosomb https://github.com/wallabag/wallabag/commit/78b0b55c40511e1f22d5bbb4897aa10fca68441c
* Replace GET way to POST way to delete API client by @nicosomb https://github.com/wallabag/wallabag/commit/ffcc5c9062fcc8cd922d7d6d65edbe5efae96806
### Improvement
* Add confirmation before reload entry by @nicosomb https://github.com/wallabag/wallabag/pull/6778
* Remove external dependencies on howto page by @viktoriussuwandi https://github.com/wallabag/wallabag/pull/6775
### Fixes
* Use Session instead of Referrer for Redirection by @Spoons https://github.com/wallabag/wallabag/pull/6119
* Reduce risk of collision for #content by @kdecherf https://github.com/wallabag/wallabag/pull/6829
* Update dependencies to fix vulnerabilities by @nicosomb https://github.com/wallabag/wallabag/pull/6783
* Fix failing randomly test by @nicosomb https://github.com/wallabag/wallabag/pull/6763
### Technical stuff
* Add check if git is installed by @nicosomb https://github.com/wallabag/wallabag/pull/6788
* Replace kernel.root_dir by kernel.project_dir by @yguedidi https://github.com/wallabag/wallabag/pull/6809
* Split symfony/symfony by @yguedidi https://github.com/wallabag/wallabag/pull/6817
* Make Crawler::extract get an array by @yguedidi https://github.com/wallabag/wallabag/pull/6812
* Use PSR-17 and PSR-18 by @yguedidi https://github.com/wallabag/wallabag/pull/6816
* Replace Client by KernelBrowser by @yguedidi https://github.com/wallabag/wallabag/pull/6813
* Replace Debug component by ErrorHandler component by @yguedidi https://github.com/wallabag/wallabag/pull/6810
* Make ImportController extends AbstractController by @yguedidi https://github.com/wallabag/wallabag/pull/6808
* Use Twig instead of templating by @yguedidi https://github.com/wallabag/wallabag/pull/6797
* Identify platforms by their class by @yguedidi https://github.com/wallabag/wallabag/pull/6799
* Move from transchoice to trans by @yguedidi https://github.com/wallabag/wallabag/pull/6800
* Replace GetResponseEvent by RequestEvent by @yguedidi https://github.com/wallabag/wallabag/pull/6811
* Ensure the kernel is shut down before calling createClient by @yguedidi https://github.com/wallabag/wallabag/pull/6803
* Ignore docker-compose.override.yml by @yguedidi https://github.com/wallabag/wallabag/pull/6814
* Add composer normalizer by @nicosomb https://github.com/wallabag/wallabag/pull/6762
## [2.6.2](https://github.com/wallabag/wallabag/tree/2.6.2) ## [2.6.2](https://github.com/wallabag/wallabag/tree/2.6.2)
[Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.1...2.6.2) [Full Changelog](https://github.com/wallabag/wallabag/compare/2.6.1...2.6.2)

View File

@ -36,7 +36,7 @@ build: ## Run webpack
prepare: clean ## Prepare database for testsuite prepare: clean ## Prepare database for testsuite
ifdef DB ifdef DB
cp .env.test.$(DB) .env.test cp app/config/tests/parameters_test.$(DB).yml app/config/parameters_test.yml
endif endif
-php bin/console doctrine:database:drop --force --env=test -php bin/console doctrine:database:drop --force --env=test
php bin/console doctrine:database:create --env=test php bin/console doctrine:database:create --env=test

View File

@ -9,7 +9,7 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
#### Prepare the release #### Prepare the release
- Update these files with new information - Update these files with new information
- `config/wallabag.yaml` (`wallabag.version`) - `app/config/wallabag.yml` (`wallabag_core.version`)
- `CHANGELOG.md` - `CHANGELOG.md`
- Create a PR named "Prepare $LAST_WALLABAG_RELEASE release". - Create a PR named "Prepare $LAST_WALLABAG_RELEASE release".
- Wait for test to be ok, merge it. - Wait for test to be ok, merge it.
@ -19,7 +19,7 @@ During this documentation, we assume the release is `$LAST_WALLABAG_RELEASE` (li
- [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports). - [Create the new release on GitHub](https://github.com/wallabag/wallabag/releases/new) by targetting the `master` branch or any appropriate branch (for instance backports).
- Update [website](https://github.com/wallabag/website) to change MD5 sum and create the release blog post (based on the changelog). - Update [website](https://github.com/wallabag/website) to change MD5 sum and create the release blog post (based on the changelog).
- Update Dockerfile https://github.com/wallabag/docker (and create a new tag) - Update Dockerfile https://github.com/wallabag/docker (and create a new tag)
- Put the next patch version suffixed with `-dev` in `config/wallabag.yaml` (`wallabag.version`) - Put the next patch version suffixed with `-dev` in `app/config/wallabag.yml` (`wallabag_core.version`)
- Drink a :beer:! - Drink a :beer:!
### Target PHP version ### Target PHP version

7
app/.htaccess Normal file
View File

@ -0,0 +1,7 @@
<IfModule mod_authz_core.c>
Require all denied
</IfModule>
<IfModule !mod_authz_core.c>
Order deny,allow
Deny from all
</IfModule>

7
app/AppCache.php Normal file
View File

@ -0,0 +1,7 @@
<?php
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
class AppCache extends HttpCache
{
}

101
app/AppKernel.php Normal file
View File

@ -0,0 +1,101 @@
<?php
use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\HttpKernel\Kernel;
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = [
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new FOS\RestBundle\FOSRestBundle(),
new FOS\UserBundle\FOSUserBundle(),
new JMS\SerializerBundle\JMSSerializerBundle(),
new Nelmio\ApiDocBundle\NelmioApiDocBundle(),
new Nelmio\CorsBundle\NelmioCorsBundle(),
new Bazinga\Bundle\HateoasBundle\BazingaHateoasBundle(),
new Lexik\Bundle\FormFilterBundle\LexikFormFilterBundle(),
new FOS\OAuthServerBundle\FOSOAuthServerBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Scheb\TwoFactorBundle\SchebTwoFactorBundle(),
new KPhoen\RulerZBundle\KPhoenRulerZBundle(),
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
new Craue\ConfigBundle\CraueConfigBundle(),
new BabDev\PagerfantaBundle\BabDevPagerfantaBundle(),
new FOS\JsRoutingBundle\FOSJsRoutingBundle(),
new BD\GuzzleSiteAuthenticatorBundle\BDGuzzleSiteAuthenticatorBundle(),
new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
new Http\HttplugBundle\HttplugBundle(),
new Sentry\SentryBundle\SentryBundle(),
new Twig\Extra\TwigExtraBundle\TwigExtraBundle(),
// wallabag bundles
new Wallabag\CoreBundle\WallabagCoreBundle(),
new Wallabag\ApiBundle\WallabagApiBundle(),
new Wallabag\UserBundle\WallabagUserBundle(),
new Wallabag\ImportBundle\WallabagImportBundle(),
new Wallabag\AnnotationBundle\WallabagAnnotationBundle(),
];
if (in_array($this->getEnvironment(), ['dev', 'test'], true)) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle();
if ('test' === $this->getEnvironment()) {
$bundles[] = new DAMA\DoctrineTestBundle\DAMADoctrineTestBundle();
}
if ('dev' === $this->getEnvironment()) {
$bundles[] = new Symfony\Bundle\MakerBundle\MakerBundle();
$bundles[] = new Symfony\Bundle\WebServerBundle\WebServerBundle();
}
}
return $bundles;
}
public function getCacheDir()
{
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
}
public function getLogDir()
{
return dirname(__DIR__) . '/var/logs';
}
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load($this->getProjectDir() . '/app/config/config_' . $this->getEnvironment() . '.yml');
$loader->load(function ($container) {
if ($container->getParameter('use_webpack_dev_server')) {
$container->loadFromExtension('framework', [
'assets' => [
'base_url' => 'http://localhost:8080/',
],
]);
} else {
$container->loadFromExtension('framework', [
'assets' => [
'base_url' => $container->getParameter('domain_name'),
],
]);
}
});
$loader->load(function (ContainerBuilder $container) {
// $container->setParameter('container.autowiring.strict_mode', true);
// $container->setParameter('container.dumper.inline_class_loader', true);
$container->addObjectResource($this);
});
}
}

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Initial database structure. * Initial database structure.
@ -14,8 +17,10 @@ class Version20160401000000 extends WallabagMigration
{ {
$this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized'); $this->skipIf($schema->hasTable($this->getTable('entry')), 'Database already initialized');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$sql = <<<SQL $sql = <<<SQL
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name)); CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name); CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);
@ -58,7 +63,7 @@ SQL
} }
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$sql = <<<SQL $sql = <<<SQL
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, UNIQUE INDEX UNIQ_5D9649505E237E06 (name), PRIMARY KEY(name)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
CREATE TABLE {$this->getTable('entry')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB; CREATE TABLE {$this->getTable('entry')} (id INT AUTO_INCREMENT NOT NULL, user_id INT DEFAULT NULL, title LONGTEXT DEFAULT NULL, url LONGTEXT DEFAULT NULL, is_archived TINYINT(1) NOT NULL, is_starred TINYINT(1) NOT NULL, content LONGTEXT DEFAULT NULL, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype LONGTEXT DEFAULT NULL, language LONGTEXT DEFAULT NULL, reading_time INT DEFAULT NULL, domain_name LONGTEXT DEFAULT NULL, preview_picture LONGTEXT DEFAULT NULL, is_public TINYINT(1) DEFAULT '0', INDEX IDX_F4D18282A76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB;
@ -91,7 +96,7 @@ SQL
$this->addSql($query); $this->addSql($query);
} }
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$sql = <<<SQL $sql = <<<SQL
CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name)); CREATE TABLE {$this->getTable('craue_config_setting')} (name VARCHAR(255) NOT NULL, value VARCHAR(255) DEFAULT NULL, section VARCHAR(255) DEFAULT NULL, PRIMARY KEY(name));
CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name); CREATE UNIQUE INDEX UNIQ_5D9649505E237E06 ON {$this->getTable('craue_config_setting')} (name);

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added foreign keys for account resetting. * Added foreign keys for account resetting.

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added name field on wallabag_oauth2_clients. * Added name field on wallabag_oauth2_clients.
@ -15,7 +16,7 @@ class Version20160812120952 extends WallabagMigration
$clientsTable = $schema->getTable($this->getTable('oauth2_clients')); $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
$this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.'); $this->skipIf($clientsTable->hasColumn('name'), 'It seems that you already played this migration.');
if ('sqlite' === $this->connection->getDatabasePlatform()->getName()) { if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
// Can't use $clientsTable->addColumn('name', 'blob'); // Can't use $clientsTable->addColumn('name', 'blob');
// because of the error: // because of the error:
// SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL // SQLSTATE[HY000]: General error: 1 Cannot add a NOT NULL column with default value NULL
@ -35,7 +36,7 @@ class Version20160812120952 extends WallabagMigration
{ {
$clientsTable = $schema->getTable($this->getTable('oauth2_clients')); $clientsTable = $schema->getTable($this->getTable('oauth2_clients'));
if ('sqlite' === $this->connection->getDatabasePlatform()->getName()) { if ($this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
$databaseTablePrefix = $this->container->getParameter('database_table_prefix'); $databaseTablePrefix = $this->container->getParameter('database_table_prefix');
$this->addSql('DROP INDEX IDX_635D765EA76ED395'); $this->addSql('DROP INDEX IDX_635D765EA76ED395');
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM ' . $databaseTablePrefix . 'oauth2_clients'); $this->addSql('CREATE TEMPORARY TABLE __temp__' . $databaseTablePrefix . 'oauth2_clients AS SELECT id, random_id, redirect_uris, secret, allowed_grant_types FROM ' . $databaseTablePrefix . 'oauth2_clients');

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added settings for RabbitMQ and Redis imports. * Added settings for RabbitMQ and Redis imports.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added pocket_consumer_key field on wallabag_config. * Added pocket_consumer_key field on wallabag_config.

View File

@ -1,10 +1,13 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added pocket_consumer_key field on wallabag_config. * Added pocket_consumer_key field on wallabag_config.
@ -13,11 +16,13 @@ class Version20161001072726 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); $platform = $this->connection->getDatabasePlatform();
$this->skipIf($platform instanceof SqlitePlatform, 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
// remove all FK from entry_tag // remove all FK from entry_tag
switch ($this->connection->getDatabasePlatform()->getName()) { switch (true) {
case 'mysql': case $platform instanceof MySQLPlatform:
$query = $this->connection->query(" $query = $this->connection->query("
SELECT CONSTRAINT_NAME SELECT CONSTRAINT_NAME
FROM information_schema.key_column_usage FROM information_schema.key_column_usage
@ -29,7 +34,7 @@ class Version20161001072726 extends WallabagMigration
$this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); $this->addSql('ALTER TABLE ' . $this->getTable('entry_tag') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
} }
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
$query = $this->connection->query(" $query = $this->connection->query("
SELECT conrelid::regclass AS table_from SELECT conrelid::regclass AS table_from
@ -53,8 +58,8 @@ class Version20161001072726 extends WallabagMigration
// remove entry FK from annotation // remove entry FK from annotation
switch ($this->connection->getDatabasePlatform()->getName()) { switch (true) {
case 'mysql': case $platform instanceof MySQLPlatform:
$query = $this->connection->query(" $query = $this->connection->query("
SELECT CONSTRAINT_NAME SELECT CONSTRAINT_NAME
FROM information_schema.key_column_usage FROM information_schema.key_column_usage
@ -68,7 +73,7 @@ class Version20161001072726 extends WallabagMigration
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']); $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' DROP FOREIGN KEY ' . $fk['CONSTRAINT_NAME']);
} }
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
// http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk // http://dba.stackexchange.com/questions/36979/retrieving-all-pk-and-fk
$query = $this->connection->query(" $query = $this->connection->query("
SELECT conrelid::regclass AS table_from SELECT conrelid::regclass AS table_from

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Converted database to utf8mb4 encoding (for MySQL only). * Converted database to utf8mb4 encoding (for MySQL only).
@ -12,7 +13,7 @@ class Version20161022134138 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;'); $this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci;');
@ -40,7 +41,7 @@ class Version20161022134138 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
$this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;'); $this->addSql('ALTER DATABASE `' . $this->connection->getParams()['dbname'] . '` CHARACTER SET = utf8 COLLATE = utf8_unicode_ci;');

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added user_id column on oauth2_clients to prevent users to delete API clients from other users. * Added user_id column on oauth2_clients to prevent users to delete API clients from other users.
@ -37,7 +38,7 @@ class Version20161024212538 extends WallabagMigration
$clientsTable->dropColumn('user_id', 'integer'); $clientsTable->dropColumn('user_id', 'integer');
if ('sqlite' !== $this->connection->getDatabasePlatform()->getName()) { if (!$this->connection->getDatabasePlatform() instanceof SqlitePlatform) {
$clientsTable->removeForeignKey($this->constraintName); $clientsTable->removeForeignKey($this->constraintName);
} }
} }

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added the internal setting to enable/disable downloading pictures. * Added the internal setting to enable/disable downloading pictures.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added created_at index on entry table. * Added created_at index on entry table.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added action_mark_as_read field on config table. * Added action_mark_as_read field on config table.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added the internal setting to share articles to unmark.it. * Added the internal setting to share articles to unmark.it.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add http_status in `entry_table`. * Add http_status in `entry_table`.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add the restricted_access internal setting for articles with paywall. * Add the restricted_access internal setting for articles with paywall.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Methods and properties removed from `FOS\UserBundle\Model\User`. * Methods and properties removed from `FOS\UserBundle\Model\User`.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added list_mode in user config. * Added list_mode in user config.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Removed locked, credentials_expire_at and expires_at. * Removed locked, credentials_expire_at and expires_at.

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Renamed uuid to uid in entry table. * Renamed uuid to uid in entry table.
@ -16,18 +19,20 @@ class Version20161214094402 extends WallabagMigration
$this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.'); $this->skipIf($entryTable->hasColumn('uid'), 'It seems that you already played this migration.');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM ' . $this->getTable('entry')); $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_entry AS SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM ' . $this->getTable('entry'));
$this->addSql('DROP TABLE ' . $this->getTable('entry')); $this->addSql('DROP TABLE ' . $this->getTable('entry'));
$this->addSql('CREATE TABLE ' . $this->getTable('entry') . ' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));'); $this->addSql('CREATE TABLE ' . $this->getTable('entry') . ' (id INTEGER NOT NULL, user_id INTEGER DEFAULT NULL, uid CLOB DEFAULT NULL COLLATE BINARY, title CLOB DEFAULT NULL COLLATE BINARY, url CLOB DEFAULT NULL COLLATE BINARY, is_archived BOOLEAN NOT NULL, is_starred BOOLEAN NOT NULL, content CLOB DEFAULT NULL COLLATE BINARY, created_at DATETIME NOT NULL, updated_at DATETIME NOT NULL, mimetype CLOB DEFAULT NULL COLLATE BINARY, language CLOB DEFAULT NULL COLLATE BINARY, reading_time INTEGER DEFAULT NULL, domain_name CLOB DEFAULT NULL COLLATE BINARY, preview_picture CLOB DEFAULT NULL COLLATE BINARY, is_public BOOLEAN DEFAULT "0", PRIMARY KEY(id));');
$this->addSql('INSERT INTO ' . $this->getTable('entry') . ' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;'); $this->addSql('INSERT INTO ' . $this->getTable('entry') . ' (id, user_id, uid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public) SELECT id, user_id, uuid, title, url, is_archived, is_starred, content, created_at, updated_at, mimetype, language, reading_time, domain_name, preview_picture, is_public FROM __temp__wallabag_entry;');
$this->addSql('DROP TABLE __temp__wallabag_entry'); $this->addSql('DROP TABLE __temp__wallabag_entry');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uuid uid VARCHAR(23)'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uuid uid VARCHAR(23)');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uuid TO uid'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uuid TO uid');
} }
} }
@ -38,14 +43,16 @@ class Version20161214094402 extends WallabagMigration
$this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.'); $this->skipIf($entryTable->hasColumn('uuid'), 'It seems that you already played this migration.');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
throw new SkipMigrationException('Too complex ...'); throw new SkipMigrationException('Too complex ...');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uid uuid VARCHAR(23)'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE uid uuid VARCHAR(23)');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' RENAME uid TO uuid');
} }
} }

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added index on wallabag_entry.uid. * Added index on wallabag_entry.uid.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived. * Added indexes on wallabag_entry.is_starred and wallabag_entry.is_archived.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add the share_scuttle internal setting. * Add the share_scuttle internal setting.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add published_at and published_by in `entry` table. * Add published_at and published_by in `entry` table.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Remove isPublic in Entry Table. * Remove isPublic in Entry Table.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Remove download_pictures in craue_config_setting. * Remove download_pictures in craue_config_setting.

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add site credential table to store username & password for some website (behind authentication or paywall). * Add site credential table to store username & password for some website (behind authentication or paywall).
@ -25,7 +26,7 @@ class Version20170501115751 extends WallabagMigration
$table->setPrimaryKey(['id']); $table->setPrimaryKey(['id']);
$table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user'); $table->addForeignKeyConstraint($this->getTable('user'), ['user_id'], ['id'], [], 'fk_user');
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$schema->dropSequence('site_credential_id_seq'); $schema->dropSequence('site_credential_id_seq');
$schema->createSequence('site_credential_id_seq'); $schema->createSequence('site_credential_id_seq');
} }

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table. * Changed length for username, username_canonical, email and email_canonical fields in wallabag_user table.
@ -19,7 +20,7 @@ class Version20170510082609 extends WallabagMigration
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
foreach ($this->fields as $field) { foreach ($this->fields as $field) {
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(180) NOT NULL;');
@ -28,7 +29,7 @@ class Version20170510082609 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
foreach ($this->fields as $field) { foreach ($this->fields as $field) {
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE ' . $field . ' ' . $field . ' VARCHAR(255) NOT NULL;');

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added `headers` field in entry table. * Added `headers` field in entry table.

View File

@ -1,10 +1,13 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Increase the length of the "quote" column of "annotation" table. * Increase the length of the "quote" column of "annotation" table.
@ -13,8 +16,10 @@ class Version20170511211659 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$annotationTableName = $this->getTable('annotation', true); $annotationTableName = $this->getTable('annotation', true);
$userTableName = $this->getTable('user', true); $userTableName = $this->getTable('user', true);
$entryTableName = $this->getTable('entry', true); $entryTableName = $this->getTable('entry', true);
@ -53,10 +58,10 @@ EOD
); );
$this->addSql('DROP TABLE __temp__wallabag_annotation'); $this->addSql('DROP TABLE __temp__wallabag_annotation');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' MODIFY quote TEXT NOT NULL');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT'); $this->addSql('ALTER TABLE ' . $this->getTable('annotation') . ' ALTER COLUMN quote TYPE TEXT');
break; break;
} }
@ -66,14 +71,16 @@ EOD
{ {
$tableName = $this->getTable('annotation'); $tableName = $this->getTable('annotation');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
throw new SkipMigrationException('Too complex ...'); throw new SkipMigrationException('Too complex ...');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote VARCHAR(255) NOT NULL'); $this->addSql('ALTER TABLE ' . $tableName . ' MODIFY quote VARCHAR(255) NOT NULL');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE VARCHAR(255)'); $this->addSql('ALTER TABLE ' . $tableName . ' ALTER COLUMN quote TYPE VARCHAR(255)');
break; break;
} }

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add api_user_registration in craue_config_setting. * Add api_user_registration in craue_config_setting.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Remove wallabag_url from craue_config_setting. * Remove wallabag_url from craue_config_setting.
@ -13,7 +13,7 @@ class Version20170606155640 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf(!$schema->hasTable($this->getTable('craue_config_setting')), 'Old migration (table name has changed)'); $this->skipIf(!$schema->hasTable($this->getTable('craue_config_setting')), 'Table already renamed');
$apiUserRegistration = $this->container $apiUserRegistration = $this->container
->get('doctrine.orm.default_entity_manager') ->get('doctrine.orm.default_entity_manager')

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Changed tags to lowercase. * Changed tags to lowercase.
@ -12,7 +13,7 @@ class Version20170719231144 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); $this->skipIf($this->connection->getDatabasePlatform() instanceof SqlitePlatform, 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
// Find tags which need to be merged // Find tags which need to be merged
$dupTags = $this->connection->query(' $dupTags = $this->connection->query('

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add starred_at column and set its value to updated_at for is_starred entries. * Add starred_at column and set its value to updated_at for is_starred entries.

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Changed reading_time field to prevent null value. * Changed reading_time field to prevent null value.
@ -12,14 +15,16 @@ class Version20171008195606 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); $platform = $this->connection->getDatabasePlatform();
switch ($this->connection->getDatabasePlatform()->getName()) { $this->skipIf($platform instanceof SqlitePlatform, 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
case 'mysql':
switch (true) {
case $platform instanceof MySQLPlatform:
$this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;');
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11) NOT NULL;');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('UPDATE ' . $this->getTable('entry') . ' SET reading_time = 0 WHERE reading_time IS NULL;');
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time SET NOT NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time SET NOT NULL;');
break; break;
@ -28,13 +33,15 @@ class Version20171008195606 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$this->skipIf('sqlite' === $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.'); $platform = $this->connection->getDatabasePlatform();
switch ($this->connection->getDatabasePlatform()->getName()) { $this->skipIf($platform instanceof SqlitePlatform, 'Migration can only be executed safely on \'mysql\' or \'postgresql\'.');
case 'mysql':
switch (true) {
case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11);'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' CHANGE reading_time reading_time INT(11);');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time DROP NOT NULL;'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER COLUMN reading_time DROP NOT NULL;');
break; break;
} }

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add origin_url column. * Add origin_url column.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add store_article_headers in craue_config_setting. * Add store_article_headers in craue_config_setting.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add shaarli_share_origin_url in craue_config_setting. * Add shaarli_share_origin_url in craue_config_setting.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add archived_at column and set its value to updated_at for is_archived entries. * Add archived_at column and set its value to updated_at for is_archived entries.

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Fix varchar field from vendor to work with utf8mb4. * Fix varchar field from vendor to work with utf8mb4.
@ -12,7 +13,7 @@ class Version20181128203230 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration can only be applied on \'mysql\'.');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(191) NOT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(191)');
@ -27,7 +28,7 @@ class Version20181128203230 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration can only be applied on \'mysql\'.'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration can only be applied on \'mysql\'.');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `token` `token` varchar(255) NOT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' CHANGE `scope` `scope` varchar(255)');

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add 2fa OTP stuff. * Add 2fa OTP stuff.
@ -12,8 +15,10 @@ final class Version20181202073750 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297'); $this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF'); $this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8'); $this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
@ -28,13 +33,13 @@ final class Version20181202073750 extends WallabagMigration
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $this->getTable('user', true) . ' (email_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $this->getTable('user', true) . ' (email_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $this->getTable('user', true) . ' (username_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E592FC23A8 ON ' . $this->getTable('user', true) . ' (username_canonical)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' CHANGE twoFactorAuthentication emailTwoFactor BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\''); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD backupCodes LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD googleAuthenticatorSecret VARCHAR(191) DEFAULT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN twofactorauthentication TO emailTwoFactor'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN twofactorauthentication TO emailTwoFactor');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP trusted');
@ -45,8 +50,10 @@ final class Version20181202073750 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8'); $this->addSql('DROP INDEX UNIQ_1D63E7E592FC23A8');
$this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF'); $this->addSql('DROP INDEX UNIQ_1D63E7E5A0D96FBF');
$this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297'); $this->addSql('DROP INDEX UNIQ_1D63E7E5C05FB297');
@ -59,13 +66,13 @@ final class Version20181202073750 extends WallabagMigration
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "' . $this->getTable('user', true) . '" (email_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON "' . $this->getTable('user', true) . '" (email_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "' . $this->getTable('user', true) . '" (confirmation_token)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON "' . $this->getTable('user', true) . '" (confirmation_token)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP googleAuthenticatorSecret'); $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP googleAuthenticatorSecret');
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` CHANGE emailtwofactor twoFactorAuthentication BOOLEAN NOT NULL'); $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` CHANGE emailtwofactor twoFactorAuthentication BOOLEAN NOT NULL');
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` ADD trusted TEXT DEFAULT NULL'); $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` ADD trusted TEXT DEFAULT NULL');
$this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP backupCodes'); $this->addSql('ALTER TABLE `' . $this->getTable('user') . '` DROP backupCodes');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP googleAuthenticatorSecret'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' DROP googleAuthenticatorSecret');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN emailTwoFactor TO twofactorauthentication'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' RENAME COLUMN emailTwoFactor TO twofactorauthentication');
$this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD trusted TEXT DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('user') . ' ADD trusted TEXT DEFAULT NULL');

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add updated_at fields to site_credential table. * Add updated_at fields to site_credential table.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add missing entries in craue_config_setting. * Add missing entries in craue_config_setting.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add hashed_url in entry. * Add hashed_url in entry.

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Rename rss_token & rss_limit to feed_token & feed_limit. * Rename rss_token & rss_limit to feed_token & feed_limit.
@ -12,8 +15,10 @@ final class Version20190425115043 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395'); $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true)); $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, rss_token, rss_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM ' . $this->getTable('config', true));
$this->addSql('DROP TABLE ' . $this->getTable('config', true)); $this->addSql('DROP TABLE ' . $this->getTable('config', true));
@ -22,11 +27,11 @@ final class Version20190425115043 extends WallabagMigration
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true)); $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON ' . $this->getTable('config', true) . ' (user_id)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_token feed_token VARCHAR(255) DEFAULT NULL');
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE rss_limit feed_limit INT DEFAULT NULL');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_token TO feed_token');
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN rss_limit TO feed_limit');
break; break;
@ -35,8 +40,10 @@ final class Version20190425115043 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX UNIQ_87E64C53A76ED395'); $this->addSql('DROP INDEX UNIQ_87E64C53A76ED395');
$this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"'); $this->addSql('CREATE TEMPORARY TABLE __temp__' . $this->getTable('config', true) . ' AS SELECT id, user_id, theme, items_per_page, language, feed_token, feed_limit, reading_speed, pocket_consumer_key, action_mark_as_read, list_mode FROM "' . $this->getTable('config', true) . '"');
$this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"'); $this->addSql('DROP TABLE "' . $this->getTable('config', true) . '"');
@ -45,11 +52,11 @@ final class Version20190425115043 extends WallabagMigration
$this->addSql('DROP TABLE __temp__' . $this->getTable('config', true)); $this->addSql('DROP TABLE __temp__' . $this->getTable('config', true));
$this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_87E64C53A76ED395 ON "' . $this->getTable('config', true) . '" (user_id)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_token rss_token');
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' CHANGE feed_limit rss_limit');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_token TO rss_token');
$this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit'); $this->addSql('ALTER TABLE ' . $this->getTable('config') . ' RENAME COLUMN feed_limit TO rss_limit');
break; break;

View File

@ -1,10 +1,13 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Enable cascade delete when deleting a user on: * Enable cascade delete when deleting a user on:
@ -17,8 +20,10 @@ final class Version20190510141130 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX IDX_368A4209A76ED395'); $this->addSql('DROP INDEX IDX_368A4209A76ED395');
$this->addSql('DROP INDEX IDX_368A420919EB6921'); $this->addSql('DROP INDEX IDX_368A420919EB6921');
$this->addSql('DROP INDEX UNIQ_368A42095F37A13B'); $this->addSql('DROP INDEX UNIQ_368A42095F37A13B');
@ -60,7 +65,7 @@ final class Version20190510141130 extends WallabagMigration
$this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)'); $this->addSql('CREATE INDEX IDX_EE52E3FAA76ED395 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (user_id)');
$this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)'); $this->addSql('CREATE INDEX IDX_EE52E3FA19EB6921 ON ' . $this->getTable('oauth2_auth_codes', true) . ' (client_id)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP FOREIGN KEY FK_368A4209A76ED395');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
@ -75,7 +80,7 @@ final class Version20190510141130 extends WallabagMigration
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' DROP FOREIGN KEY FK_EE52E3FAA76ED395');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_auth_codes') . ' ADD CONSTRAINT FK_EE52E3FAA76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' DROP CONSTRAINT FK_368A4209A76ED395');
$this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE'); $this->addSql('ALTER TABLE ' . $this->getTable('oauth2_access_tokens') . ' ADD CONSTRAINT FK_368A4209A76ED395 FOREIGN KEY (user_id) REFERENCES ' . $this->getTable('user') . ' (id) ON DELETE CASCADE NOT DEFERRABLE INITIALLY IMMEDIATE');

View File

@ -2,10 +2,11 @@
declare(strict_types=1); declare(strict_types=1);
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Convert tab label to utf8mb4_bin (MySQL only). * Convert tab label to utf8mb4_bin (MySQL only).
@ -14,7 +15,7 @@ final class Version20190511165128 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;'); $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;'); $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;');
@ -22,7 +23,7 @@ final class Version20190511165128 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$this->skipIf('mysql' !== $this->connection->getDatabasePlatform()->getName(), 'This migration only apply to MySQL'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof MySQLPlatform, 'This migration only apply to MySQL');
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `slug` `slug` VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');
$this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;'); $this->addSql('ALTER TABLE ' . $this->getTable('tag') . ' CHANGE `label` `label` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;');

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added `given_url` & `hashed_given_url` field in entry table. * Added `given_url` & `hashed_given_url` field in entry table.

View File

@ -1,9 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Change reading_time field on SQLite to be integer NOT NULL * Change reading_time field on SQLite to be integer NOT NULL
@ -14,7 +15,7 @@ final class Version20190619093534 extends WallabagMigration
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
// this up() migration is auto-generated, please modify it to your needs // this up() migration is auto-generated, please modify it to your needs
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof SqlitePlatform, 'Migration can only be executed safely on \'sqlite\'.');
$this->addSql('UPDATE ' . $this->getTable('entry', true) . ' SET reading_time = 0 WHERE reading_time IS NULL;'); $this->addSql('UPDATE ' . $this->getTable('entry', true) . ' SET reading_time = 0 WHERE reading_time IS NULL;');
@ -42,7 +43,7 @@ final class Version20190619093534 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
// this down() migration is auto-generated, please modify it to your needs // this down() migration is auto-generated, please modify it to your needs
$this->skipIf('sqlite' !== $this->connection->getDatabasePlatform()->getName(), 'Migration can only be executed safely on \'sqlite\'.'); $this->skipIf(!$this->connection->getDatabasePlatform() instanceof SqlitePlatform, 'Migration can only be executed safely on \'sqlite\'.');
$this->addSql('DROP INDEX IDX_F4D18282A76ED395'); $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
$this->addSql('DROP INDEX created_at'); $this->addSql('DROP INDEX created_at');

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Change reading speed value. * Change reading speed value.

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Adding more index to kill some slow queries: * Adding more index to kill some slow queries:
@ -18,8 +21,10 @@ final class Version20190806130304 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX uid'); $this->addSql('DROP INDEX uid');
$this->addSql('DROP INDEX created_at'); $this->addSql('DROP INDEX created_at');
$this->addSql('DROP INDEX hashed_url_user_id'); $this->addSql('DROP INDEX hashed_url_user_id');
@ -44,7 +49,7 @@ final class Version20190806130304 extends WallabagMigration
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag', true) . ' (label)'); $this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag', true) . ' (label)');
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config', true) . ' (feed_token)'); $this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config', true) . ' (feed_token)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language VARCHAR(20) DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language VARCHAR(20) DEFAULT NULL');
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)'); $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)'); $this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
@ -53,7 +58,7 @@ final class Version20190806130304 extends WallabagMigration
$this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label (255))'); $this->addSql('CREATE INDEX tag_label ON ' . $this->getTable('tag') . ' (label (255))');
$this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token (255))'); $this->addSql('CREATE INDEX config_feed_token ON ' . $this->getTable('config') . ' (feed_token (255))');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE VARCHAR(20)');
$this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)'); $this->addSql('CREATE INDEX user_language ON ' . $this->getTable('entry') . ' (language, user_id)');
$this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)'); $this->addSql('CREATE INDEX user_archived ON ' . $this->getTable('entry') . ' (user_id, is_archived, archived_at)');
@ -67,8 +72,10 @@ final class Version20190806130304 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('DROP INDEX IDX_F4D18282A76ED395'); $this->addSql('DROP INDEX IDX_F4D18282A76ED395');
$this->addSql('DROP INDEX created_at'); $this->addSql('DROP INDEX created_at');
$this->addSql('DROP INDEX uid'); $this->addSql('DROP INDEX uid');
@ -93,7 +100,7 @@ final class Version20190806130304 extends WallabagMigration
$this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)'); $this->addSql('CREATE INDEX hashed_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_url)');
$this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)'); $this->addSql('CREATE INDEX hashed_given_url_user_id ON ' . $this->getTable('entry', true) . ' (user_id, hashed_given_url)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language LONGTEXT DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' MODIFY language LONGTEXT DEFAULT NULL');
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry')); $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry')); $this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));
@ -102,7 +109,7 @@ final class Version20190806130304 extends WallabagMigration
$this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag')); $this->addSql('DROP INDEX tag_label ON ' . $this->getTable('tag'));
$this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config')); $this->addSql('DROP INDEX config_feed_token ON ' . $this->getTable('config'));
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT'); $this->addSql('ALTER TABLE ' . $this->getTable('entry') . ' ALTER language TYPE TEXT');
$this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry')); $this->addSql('DROP INDEX user_language ON ' . $this->getTable('entry'));
$this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry')); $this->addSql('DROP INDEX user_archived ON ' . $this->getTable('entry'));

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Change the internal setting table name. * Change the internal setting table name.
@ -12,14 +15,16 @@ final class Version20190808124957 extends WallabagMigration
{ {
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true)); $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting', true) . ' RENAME TO ' . $this->getTable('internal_setting', true));
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting')); $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME ' . $this->getTable('internal_setting'));
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting')); $this->addSql('ALTER TABLE ' . $this->getTable('craue_config_setting') . ' RENAME TO ' . $this->getTable('internal_setting'));
break; break;
} }
@ -27,14 +32,16 @@ final class Version20190808124957 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true)); $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting', true) . ' RENAME TO ' . $this->getTable('craue_config_setting', true));
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting')); $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME ' . $this->getTable('craue_config_setting'));
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting')); $this->addSql('ALTER TABLE ' . $this->getTable('internal_setting') . ' RENAME TO ' . $this->getTable('craue_config_setting'));
break; break;
} }

View File

@ -2,10 +2,11 @@
declare(strict_types=1); declare(strict_types=1);
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Add tables for the ignore origin rules. * Add tables for the ignore origin rules.
@ -23,7 +24,7 @@ final class Version20190826204730 extends WallabagMigration
$userTable->setPrimaryKey(['id']); $userTable->setPrimaryKey(['id']);
$userTable->addForeignKeyConstraint($this->getTable('config'), ['config_id'], ['id'], [], 'fk_config'); $userTable->addForeignKeyConstraint($this->getTable('config'), ['config_id'], ['id'], [], 'fk_config');
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$schema->dropSequence('ignore_origin_user_rule_id_seq'); $schema->dropSequence('ignore_origin_user_rule_id_seq');
$schema->createSequence('ignore_origin_user_rule_id_seq'); $schema->createSequence('ignore_origin_user_rule_id_seq');
} }
@ -35,7 +36,7 @@ final class Version20190826204730 extends WallabagMigration
$instanceTable->addColumn('rule', 'string', ['length' => 255]); $instanceTable->addColumn('rule', 'string', ['length' => 255]);
$instanceTable->setPrimaryKey(['id']); $instanceTable->setPrimaryKey(['id']);
if ('postgresql' === $this->connection->getDatabasePlatform()->getName()) { if ($this->connection->getDatabasePlatform() instanceof PostgreSQLPlatform) {
$schema->dropSequence('ignore_origin_instance_rule_id_seq'); $schema->dropSequence('ignore_origin_instance_rule_id_seq');
$schema->createSequence('ignore_origin_instance_rule_id_seq'); $schema->createSequence('ignore_origin_instance_rule_id_seq');
} }
@ -44,7 +45,7 @@ final class Version20190826204730 extends WallabagMigration
public function postUp(Schema $schema): void public function postUp(Schema $schema): void
{ {
foreach ($this->container->getParameter('wallabag.default_ignore_origin_instance_rules') as $entity) { foreach ($this->container->getParameter('wallabag_core.default_ignore_origin_instance_rules') as $entity) {
$previous_rule = $this->container $previous_rule = $this->container
->get('doctrine.orm.default_entity_manager') ->get('doctrine.orm.default_entity_manager')
->getConnection() ->getConnection()

View File

@ -1,10 +1,10 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Migrations\SkipMigrationException; use Doctrine\DBAL\Migrations\SkipMigrationException;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Remove baggy theme. * Remove baggy theme.

View File

@ -2,10 +2,10 @@
declare(strict_types=1); declare(strict_types=1);
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Renamed Piwik to Matomo in configuration. * Renamed Piwik to Matomo in configuration.

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Drop theme fields from config table. * Drop theme fields from config table.

View File

@ -1,9 +1,12 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration; use Doctrine\DBAL\Platforms\MySQLPlatform;
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
use Doctrine\DBAL\Platforms\SqlitePlatform;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Remove the deprecated (and removed in DBAL v3) `json_array` type. * Remove the deprecated (and removed in DBAL v3) `json_array` type.
@ -13,8 +16,10 @@ final class Version20221221092957 extends WallabagMigration
public function up(Schema $schema): void public function up(Schema $schema): void
{ {
$userTable = $this->getTable('user'); $userTable = $this->getTable('user');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, password, last_login, password_requested_at, name, created_at, updated_at, authCode, emailTwoFactor, salt, confirmation_token, roles, googleAuthenticatorSecret, backupCodes FROM ' . $userTable); $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, password, last_login, password_requested_at, name, created_at, updated_at, authCode, emailTwoFactor, salt, confirmation_token, roles, googleAuthenticatorSecret, backupCodes FROM ' . $userTable);
$this->addSql('DROP TABLE ' . $userTable); $this->addSql('DROP TABLE ' . $userTable);
$this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array) $this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
@ -26,10 +31,10 @@ final class Version20221221092957 extends WallabagMigration
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL'); $this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupcodes TYPE JSON USING backupcodes::json'); $this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupcodes TYPE JSON USING backupcodes::json');
break; break;
} }
@ -38,8 +43,10 @@ final class Version20221221092957 extends WallabagMigration
public function down(Schema $schema): void public function down(Schema $schema): void
{ {
$userTable = $this->getTable('user'); $userTable = $this->getTable('user');
switch ($this->connection->getDatabasePlatform()->getName()) { $platform = $this->connection->getDatabasePlatform();
case 'sqlite':
switch (true) {
case $platform instanceof SqlitePlatform:
$this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, googleAuthenticatorSecret, backupCodes, emailTwoFactor FROM ' . $userTable); $this->addSql('CREATE TEMPORARY TABLE __temp__wallabag_user AS SELECT id, username, username_canonical, email, email_canonical, enabled, salt, password, last_login, confirmation_token, password_requested_at, roles, name, created_at, updated_at, authCode, googleAuthenticatorSecret, backupCodes, emailTwoFactor FROM ' . $userTable);
$this->addSql('DROP TABLE ' . $userTable); $this->addSql('DROP TABLE ' . $userTable);
$this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array) $this->addSql('CREATE TABLE ' . $userTable . ' (id INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, username VARCHAR(180) NOT NULL, username_canonical VARCHAR(180) NOT NULL, email VARCHAR(180) NOT NULL, email_canonical VARCHAR(180) NOT NULL, enabled BOOLEAN NOT NULL, salt VARCHAR(255) DEFAULT NULL, password VARCHAR(255) NOT NULL, last_login DATETIME DEFAULT NULL, confirmation_token VARCHAR(180) DEFAULT NULL, password_requested_at DATETIME DEFAULT NULL, roles CLOB NOT NULL --(DC2Type:array)
@ -51,10 +58,10 @@ final class Version20221221092957 extends WallabagMigration
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5A0D96FBF ON ' . $userTable . ' (email_canonical)');
$this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)'); $this->addSql('CREATE UNIQUE INDEX UNIQ_1D63E7E5C05FB297 ON ' . $userTable . ' (confirmation_token)');
break; break;
case 'mysql': case $platform instanceof MySQLPlatform:
$this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL COMMENT \'(DC2Type:json_array)\''); $this->addSql('ALTER TABLE ' . $userTable . ' CHANGE backupCodes backupCodes JSON DEFAULT NULL COMMENT \'(DC2Type:json_array)\'');
break; break;
case 'postgresql': case $platform instanceof PostgreSQLPlatform:
$this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupCodes TYPE TEXT'); $this->addSql('ALTER TABLE ' . $userTable . ' ALTER backupCodes TYPE TEXT');
break; break;
} }

View File

@ -1,9 +1,9 @@
<?php <?php
namespace DoctrineMigrations; namespace Application\Migrations;
use App\Doctrine\WallabagMigration;
use Doctrine\DBAL\Schema\Schema; use Doctrine\DBAL\Schema\Schema;
use Wallabag\CoreBundle\Doctrine\WallabagMigration;
/** /**
* Added a new setting to display or not thumbnails. * Added a new setting to display or not thumbnails.

View File

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 891 B

After

Width:  |  Height:  |  Size: 891 B

View File

Before

Width:  |  Height:  |  Size: 451 B

After

Width:  |  Height:  |  Size: 451 B

View File

Before

Width:  |  Height:  |  Size: 995 B

After

Width:  |  Height:  |  Size: 995 B

View File

Before

Width:  |  Height:  |  Size: 1012 B

After

Width:  |  Height:  |  Size: 1012 B

View File

Before

Width:  |  Height:  |  Size: 718 B

After

Width:  |  Height:  |  Size: 718 B

View File

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

View File

Before

Width:  |  Height:  |  Size: 138 B

After

Width:  |  Height:  |  Size: 138 B

View File

@ -3,7 +3,7 @@
========================================================================== */ ========================================================================== */
main { main {
#content { div#content {
padding: 0 0.5rem; padding: 0 0.5rem;
} }
} }

Some files were not shown because too many files have changed in this diff Show More