Giter Club home page Giter Club logo

psalm.dev's People

Contributors

androlgenhald avatar bdsl avatar caugner avatar danog avatar ghostwriter avatar kkmuffme avatar lesuisse avatar lptn avatar muglug avatar orklah avatar staabm avatar tysonandre avatar weirdan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psalm.dev's Issues

request for online type resolver

whilst one can write code up on psalm.dev to check if a given set of code passes/fails psalm, it may be beneficial to have a more focused tool for determining if a given value type is compatible against another type (i.e. param/return).

ideally something like one of those online regex tools that give you an input for the type and an input for the thing to test against, with optional debug-level breakdown.

may require a third field for "stubs".

does psalm already expose apis for "input type string, test against type string" or would this be a massive headache?

Update psalm.dev to be compatible with changed Psalm API

@muglug currently all snippets are failing with:

Psalm runner output:

Internal Psalm error on line 51 - /var/www/vhosts/psalm.dev/httpdocs/src/OnlineChecker.php: Call to undefined method Psalm\Internal\Analyzer\ProjectAnalyzer::checkClassReferences()

I suppose OnlineChecker relied on internal API that got changed.

Idea: psalm.dev/InvalidArgument could be a redirect to (or copy of) the relevant docs?

(If there's an article of the same name, prioritize that over the automatically generated name)

E.g. http://php.net/is_array does something similar. The canonical url is https://www.php.net/manual/en/function.is-array.php

This would help developers looking at issues reported in different file formats.

I'm not familiar with the static site generator used here. HTML <meta> redirects should be possible on static hosting.

Different psalm versions?

It would be great if various psalm versions could be checked using query param, similar to how different PHP versions can be passed via query param.
e.g. at least the last v4 + all the v5 versions.

This would often help to identify if an issue already existed previously/worked correctly in previous versions.

Uninitialized string offset when using Psalter online

https://psalm.dev/r/dad1de849f (click Fix code button).

Results in :

<br />
<b>Notice</b>:  Uninitialized string offset: 14 in <b>/var/www/vhosts/psalm.dev/httpdocs/vendor/vimeo/psalm/src/Psalm/FileManipulation.php</b> on line <b>62</b><br />
{"results":[],"version":"dev-master@bf569d1b07a56f9d5a42af102e4465182e33c187","fixed_contents":"<?php\n","hash":"a559a8d3e218ba361a1a6d790b194c79","type_map":[],"fixable_errors":[]}

Which cannot be parsed as JSON.

Request for button to "copy github-flavoured-markdown issue template to clipboard"

Enabling button

  • If route matches /r/{token:[a-f0-9]+} and
  • If textarea#code has not changed then
  • Enable button that copies the content into a pre-filled issue-template featuring github-flavoured markdown to easily post an issue on vimeo/psalm

Disabling button

  • If textarea#code is changed, or
  • Route does not match /r/{token:[a-f0-9]+} then
  • Disable button

Notices on psalm.dev

Currently I'm getting the following while trying to run a snippet:

Notice: Undefined index: /var/www/vhosts/psalm.dev/httpdocs/src/../src/somefile.php in /var/www/vhosts/psalm.dev/httpdocs/src/OnlineChecker.php on line 129

Warning: ksort() expects parameter 1 to be array, null given in /var/www/vhosts/psalm.dev/httpdocs/src/OnlineChecker.php on line 133

Warning: Invalid argument supplied for foreach() in /var/www/vhosts/psalm.dev/httpdocs/src/OnlineChecker.php on line 135
{"results":[],"version":"dev-master@91638781746519c5d03c18bd37b0725adfd0974d","fixed_contents":null,"hash":"fa8da89d01b934beb72cfe84bb636624","type_map":[]}

Cannot run `composer update` in `php-apache` container

$ docker-compose exec php-apache composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Nothing to install, update or remove
Package league/commonmark-ext-table is abandoned, you should avoid using it. Use league/commonmark instead.
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
17 packages you are using are looking for funding.
Use the `composer fund` command to find out more!
> composer bin all install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Package operations: 21 installs, 0 updates, 0 removals
    Failed to download psr/simple-cache from dist: The zip extension and unzip/7z commands are both missing, skipping.
Your command-line PHP is using multiple ini files. Run `php --ini` to show them.
    Now trying to download from source


  [RuntimeException]
  git was not found in your PATH, skipping source download


install [--prefer-source] [--prefer-dist] [--prefer-install PREFER-INSTALL] [--dry-run] [--dev] [--no-suggest] [--no-dev] [--no-autoloader] [--no-scripts] [--no-progress] [--no-install] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--] [<packages>]...

Script composer bin all install handling the post-install-cmd event returned with error code 1

Probably it's best to add both git and unzip to the Dockerfile.

Implement Psalter

Hi,

I was looking to see if I was able to push a PR to add Psalter to the website but unless I'm mistaken, there seems to already be code for that.

Either I never found out how it's supposed to work or it's not actually working.

Should I go forward and try to implement it?

New font is hard to read

Since a couple of days the font seems to have changed to Times New Roman. In my opinion it is now very hard to read the documentation, as the font is very thin (see the image below).

image

I think this is a bug, since I get a HTTP status 404 for the file https://cloud.typography.com/751592/7707372/css/fonts.css.

Uses Psalm's dev artifacts that are not guaranteed to be installed

With Composer 2.1 default download method changed to zip/dist (changelog entry, PR), even for dev-* versions. This means .gitattributes of dependencies are no longer ignored, specifically vimeo/psalm:dev-master no longer brings along vendor/vimeo/psalm/tests folder.

This causes issues when dependencies are installed in a freshly built container, as vendor/vimeo/psalm/tests/Internal/Provider/FakeFileProvider.php (required in src/OnlineChecker.php) is not available when installed this way.

Implement SQL Migrations

Today I accidentally broke psalm.dev by careless merge. I kinda assumed schema changes would get applied automatically, but they aren't.

We need a way to automatically deploy schema changes, so some kind of SQL migration engine is needed.

request for means of specifying psalm version

When using psalm.dev to attempt to reproduce an error only to find there's no errors in the reduced example code, it's not always feasible to immediately update a project to dev-master to see if the problem goes away.

How feasible is it to allow end-users to select a version of psalm to test against?

Add white-space: pre-wrap to #psalm_output

--- a/assets/sass/front.scss
+++ b/assets/sass/front.scss
@@ -73,6 +73,10 @@ div.cm_container {
     }
 }
 
+#psalm_output {
+    white-space: pre-wrap;
+}
+

I didn't see the exact command you used to produce the assets anywhere

The pre-wrap means that long errors continue to wrap to the next line.

This fixes the formatting of error messages such as for the following (should have multiple spaces in the web UI, but those previously got collapsed)

<?php
  
var_export('test   x' === 'test x');

Treat assert() as failing

vimeo/psalm#6989 reported a case where psalm is failing due to an assert() in php-parser but psalm.dev continues the analysis. I think psalm.dev should behave as if we were in dev environment because this is usually the way Psalm runs

Fonts are missing from the source

When working on a change locally I noticed failed http requests to /extra/*ttf URLs. It appears that folder is supposed to contain fonts, but it's missing from the source tree, and not generated during the build either.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.