diff --git a/CHANGELOG.md b/CHANGELOG.md index e78734a..072c5d5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes of the `phpstan.el` are documented in this file using the [K +## [0.8.2] + +### Fixed + +* Fix compilation errors on Emacs 30 + ## [0.8.1] ### Added diff --git a/Eask b/Eask index e9f7321..bc9f916 100644 --- a/Eask +++ b/Eask @@ -1,5 +1,5 @@ (package "phpstan" - "0.7.2" + "0.8.2" "Interface to PHPStan (PHP static analyzer)") (website-url "https://github.com/emacs-php/phpstan.el") diff --git a/flycheck-phpstan.el b/flycheck-phpstan.el index 49431b8..4a6242b 100644 --- a/flycheck-phpstan.el +++ b/flycheck-phpstan.el @@ -1,13 +1,13 @@ ;;; flycheck-phpstan.el --- Flycheck integration for PHPStan -*- lexical-binding: t; -*- -;; Copyright (C) 2023 Friends of Emacs-PHP development +;; Copyright (C) 2025 Friends of Emacs-PHP development ;; Author: USAMI Kenta ;; Created: 15 Mar 2018 -;; Version: 0.7.2 +;; Version: 0.8.2 ;; Keywords: tools, php ;; Homepage: https://github.com/emacs-php/phpstan.el -;; Package-Requires: ((emacs "24.3") (flycheck "26") (phpstan "0.7.2")) +;; Package-Requires: ((emacs "24.3") (flycheck "26") (phpstan "0.8.2")) ;; License: GPL-3.0-or-later ;; This program is free software; you can redistribute it and/or modify diff --git a/flymake-phpstan.el b/flymake-phpstan.el index d1dc8ee..3f1c5d2 100644 --- a/flymake-phpstan.el +++ b/flymake-phpstan.el @@ -1,13 +1,13 @@ ;;; flymake-phpstan.el --- Flymake backend for PHP using PHPStan -*- lexical-binding: t; -*- -;; Copyright (C) 2023 Friends of Emacs-PHP development +;; Copyright (C) 2025 Friends of Emacs-PHP development ;; Author: USAMI Kenta ;; Created: 31 Mar 2020 -;; Version: 0.7.2 +;; Version: 0.8.2 ;; Keywords: tools, php ;; Homepage: https://github.com/emacs-php/phpstan.el -;; Package-Requires: ((emacs "26.1") (phpstan "0.7.2")) +;; Package-Requires: ((emacs "26.1") (phpstan "0.8.2")) ;; License: GPL-3.0-or-later ;; This program is free software; you can redistribute it and/or modify diff --git a/phpstan.el b/phpstan.el index c7d6f8f..bb95533 100644 --- a/phpstan.el +++ b/phpstan.el @@ -1,13 +1,13 @@ ;;; phpstan.el --- Interface to PHPStan -*- lexical-binding: t; -*- -;; Copyright (C) 2023 Friends of Emacs-PHP development +;; Copyright (C) 2025 Friends of Emacs-PHP development ;; Author: USAMI Kenta ;; Created: 15 Mar 2018 -;; Version: 0.7.2 +;; Version: 0.8.2 ;; Keywords: tools, php ;; Homepage: https://github.com/emacs-php/phpstan.el -;; Package-Requires: ((emacs "25.1") (compat "29") (php-mode "1.22.3") (php-runtime "0.2")) +;; Package-Requires: ((emacs "25.1") (compat "30") (php-mode "1.22.3") (php-runtime "0.2")) ;; License: GPL-3.0-or-later ;; This program is free software; you can redistribute it and/or modify @@ -61,7 +61,9 @@ (eval-when-compile (require 'compat nil t) (require 'php) - (require 'json)) + (require 'json) + (declare-function 'tramp-dissect-file-name "tramp" '(name &optional nodefault)) + (declare-function 'tramp-file-name-localname "tamp" '(cl-x))) ;; Variables: (defgroup phpstan nil @@ -161,7 +163,7 @@ have unexpected behaviors or performance implications." :group 'phpstan) (defcustom phpstan-not-ignorable-identifiers '("ignore.parseError") - "A list of identifiers that are prohibited from being added to the @phpstan-ignore tag." + "Lists identifiers prohibited from being added to @phpstan-ignore tags." :type '(repeat string)) (defvar-local phpstan--use-xdebug-option nil) @@ -570,10 +572,9 @@ POSITION determines where to insert the comment and can be either `this-line' or (list (if current-prefix-arg 'this-line 'previous-line))) (save-restriction (widen) - (let ((pos (point)) - (identifiers (cl-set-difference (alist-get (phpstan--current-line) phpstan--ignorable-errors) phpstan-not-ignorable-identifiers :test #'equal)) + (let ((identifiers (cl-set-difference (alist-get (phpstan--current-line) phpstan--ignorable-errors) phpstan-not-ignorable-identifiers :test #'equal)) (padding (if (eq position 'this-line) " " "")) - new-position new-point delete-region) + new-position new-point append) (cl-multiple-value-setq (new-position new-point append) (phpstan--check-existing-ignore-tag :in-previous nil)) (when new-position (setq position new-position))