1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00
Commit Graph

4483 Commits

Author SHA1 Message Date
Matthew Brown
537fbf059a Allow moving instance method into subclass 2019-06-08 16:59:19 -04:00
Matthew Brown
8ff960af9e
Removed newline 2019-06-08 16:35:26 -04:00
Matthew Brown
21431caaca
Add preamble about templated types 2019-06-08 16:34:37 -04:00
Matthew Brown
395057c6df Fix #1738 - constrain template type when class-string<T> is a param 2019-06-08 11:08:08 -04:00
Matthew Brown
c38108f95d Fix byref array assignment
Fixes #1702
2019-06-08 10:32:46 -04:00
Barney Laurance
d44be5eb9c Allow deploying phar to any github repository
Potentially useful for fork owners to test out phar deployment without affecting
the official psalm/phar repo.

To enable phar deployments from your own fork of psalm:

- Enable builds with Travis
- Create a github repository to hold recieve the built phar packages
- Create a new dedicated github user for the deployments
- From your main github account, invite the new user to collobrate on the phar repository
- From the new user's account, accept the invitation
- From the new user's account, obtain a 'new personal access token' ( https://github.com/settings/tokens/new ) with repo scope

- In travis settings for your fork of psalm, set two environment
variables:

- PHAR_REPO_SLUG - this should be the name the phar repo you set up earlier, e.g. fred/phar
- GITHUB_TOKEN - This is the personal access token of the new user you obtained above. Anyone who knows this token
                 can push to the repository, so keep it secret. Make sure 'Display value in build log' is
                 switched off'

Now any push to branches in your fork of psalm, should automatically
result in a commit containing the phar file in your phar repository.
2019-06-08 09:46:08 -04:00
Matthew Brown
42cc201e9e Fix #1698 - better understand inherited docblock return types 2019-06-08 09:44:22 -04:00
Matthew Brown
b0678bdc74 Improve treatment of key-of
Ref #1698
2019-06-07 21:27:50 -04:00
Matthew Brown
2fa0f27872 Prevent LessSpecificImplementedReturnType with extended template 2019-06-07 18:42:26 -04:00
Barney Laurance
811cc08948 Don't allow installation of psalm/phar and vimeo/psalm in the same project
The scoped and non-scoped code don't work together.
2019-06-07 17:06:00 -04:00
Brown
c81a9a8737 Fix #1742 - allow is_countable assertion to mean something 2019-06-07 15:49:10 -04:00
Brown
4660beb28e Still look at param defaults even without param types 2019-06-07 14:24:15 -04:00
Brown
3c3c8cd3b9 Always analyse class constants 2019-06-07 13:23:52 -04:00
Brown
b00d51b7db Allow misplaced required params so Psalm still inspects the code 2019-06-07 09:25:12 -04:00
Barney Laurance
91c11a0443 Simpler globbing for travis deploy
Previous versions failed. This will delete all files except hidden files. The only hidden files that we expect to exist at present are the .git directory and .gitignore
2019-06-07 08:33:02 -04:00
Barney Laurance
80837267e7 Fix syntax error in travis deploy script
This should resolve the build failure https://travis-ci.org/vimeo/psalm/jobs/542700463
2019-06-07 07:49:07 -04:00
Barney Laurance
34f152e82a Update PHP version req in phar to match non-phar requirement
I'm guessing there's no difference between the two which means one needs 7.1 and the other only needs 7.0

Co-Authored-By: Bruce Weirdan <weirdan@gmail.com>
2019-06-07 06:52:07 -04:00
Barney Laurance
607ecbe01f Fix reference to psalm_plugin in box.json.dist 2019-06-07 06:52:07 -04:00
Barney Laurance
673661c6da Exit build-phar script on any error 2019-06-07 06:52:07 -04:00
Barney Laurance
fee7a7be43 Set travis deploy phar script to exit at first error 2019-06-07 06:52:07 -04:00
Barney Laurance
eecd21a7d5 Add executable PHP files to PHAR distribution
Previously a user of the phar distribution would have to invoke psalm as
`vendor/bin/psalm.phar`. This is different to the command given in
the psalm documentation, `vendor/bin/psalm`

I also copied all files from the psalm/phar repo into
assets/psalm-phar, so that development can be concentrated in this repo.

The travis-deploy-phar.sh should copy any changes made back into the
psalm/phar.git repo.
2019-06-07 06:52:07 -04:00
Matthew Brown
c3d27c6e96 Fix build in latest PHPUnit 2019-06-07 06:51:34 -04:00
Matthew Brown
20c66f693e Fix handling of class const types 2019-06-06 18:46:40 -04:00
Matthew Brown
36ac342496 Fix handling of property type with default 2019-06-06 17:42:23 -04:00
Matthew Brown
4a954acf84 Improve printing of literal types 2019-06-06 17:39:14 -04:00
Matthew Brown
b091ceaa9a Fix union of literal class string 2019-06-06 17:18:24 -04:00
Brown
9aeaf1a4ed Fix #1746 - allow DeprecatedInterface to be suppressed with referencedClass 2019-06-06 14:48:33 -04:00
Brown
b1d1ab974c Preserve formatting of callable type 2019-06-06 14:27:49 -04:00
Brown
0221282074 Be resilient to docblock spaces 2019-06-06 13:57:00 -04:00
Brown
2e7d26af6a Replace object-like types too 2019-06-06 13:28:56 -04:00
Brown
9573429f1e Always disable uopz
Ref #1741
2019-06-06 10:36:26 -04:00
Matthew Brown
90b160aece Allow extensions to be disabled during --init
Ref #1741
2019-06-06 08:42:44 -04:00
Jaik Dean
61203857a0 Require stable version of openlss/lib-array2xml 2019-06-06 07:06:07 -04:00
Matthew Brown
0287adfd44 Fix const replacements when moving classes 2019-06-06 07:05:30 -04:00
Matthew Brown
4fc5d1d5c8 Rewrite use statements 2019-06-05 22:13:33 -04:00
Matthew Brown
c6063d1378 Only replace same-file param docblock types 2019-06-05 19:32:27 -04:00
Brown
ddd287fb3d Move exception classes 2019-06-05 11:33:04 -04:00
Brown
6f0a6201de Fix static calls after moving 2019-06-05 11:22:09 -04:00
Brown
3e15fa8bfe Fix bad namespacing 2019-06-05 11:15:52 -04:00
Brown
4dba1e694f Change psalm-refactor perms 2019-06-05 10:43:51 -04:00
Brown
cfb38c315c Add psalm-refactor redirect 2019-06-05 10:43:15 -04:00
Matthew Brown
f327d75116 Add actual file moving 2019-06-05 08:50:24 -04:00
Matthew Brown
ad4e2f72e2 Add means to guess PSR4 file path 2019-06-05 08:50:24 -04:00
Brown
f309c755f8 Add ability to move classes 2019-06-05 08:50:24 -04:00
Matthew Brown
13779e760e Fix #1736 - forbid | in @psalm-assert 2019-06-05 00:46:55 -04:00
Matthew Brown
5a9052fa18 Use low 7.2 for Phar 2019-06-04 20:32:30 -04:00
Matthew Brown
a581b4c443 Build Phar on 7.1 so it doesn’t get php73 polyfill
Fixes #1739
2019-06-04 19:14:12 -04:00
Brown
c7f35c263c Fix #1737 properly 2019-06-04 14:08:49 -04:00
Brown
67c9851b95 Fix Psalm bug, and add test to capture it 2019-06-04 13:43:11 -04:00
Brown
d34c1a94db Fix #1737 - treat !isset($x, $y) properly 2019-06-04 13:43:09 -04:00