php-mode icon indicating copy to clipboard operation
php-mode copied to clipboard

PSR-2 started indent with two spaces

Open etu opened this issue 6 years ago • 9 comments

Something happened between b67b34c43c6e937b70fcf87cc324936ef117093b (works fine) and 2c83fbe9af2ac07806e973ed6baa34582fb70f4e (newer one but doesn't work fine) that breaks my PSR-2 indentation.

<?php
namespace Lib;

class MyClass
{
    function myFunction()
    {
    // Pressing tab here will place this line indented at six spaces from "zero" instead of eight.
    }
}

etu avatar Apr 17 '18 12:04 etu

This also happend to me. I am using spacemacs.

dbrw avatar Apr 17 '18 12:04 dbrw

@etu @dbrw Thank you for reporting. Can you give me more information by M-x php-mode-debug?

--- PHP-MODE DEBUG BEGIN ---
versions: GNU Emacs 26.1 (build 1, x86_64-apple-darwin17.5.0, NS appkit-1561.40 Version 10.13.4 (Build 17E199))
 of 2018-04-10; PHP Mode 1.19.0 of 2018-04-08
package-version: 20180413.202
major-mode: php-mode
minor-modes: (hi-lock-mode subword-mode diff-auto-refine-mode auto-complete-mode yafolding-mode vi-tilde-fringe-mode idle-highlight-mode goto-address-prog-mode copy-file-on-save-mode dmacro-mode keyfreq-autosave-mode keyfreq-mode hamburger-menu-mode indent-guide-mode beacon-mode right-click-context-mode smooth-scroll-mode which-key-mode undo-tree-mode shell-dirtrack-mode recentf-mode yas-minor-mode which-function-mode electric-pair-mode flycheck-mode projectile-mode editorconfig-mode helm-mode helm--remap-mouse-mode async-bytecomp-package-mode volatile-highlights-mode show-paren-mode nyan-mode tooltip-mode eldoc-mode electric-indent-mode mouse-wheel-mode menu-bar-mode file-name-shadow-mode font-lock-mode blink-cursor-mode auto-composition-mode auto-encryption-mode auto-compression-mode column-number-mode line-number-mode transient-mark-mode abbrev-mode)
variables: ((indent-tabs-mode nil) (tab-width 8))
custom variables: ((php-executable /usr/local/bin/php) (php-default-face default) (php-speedbar-config t) (php-mode-speedbar-open nil) (php-template-compatibility nil) (php-lineup-cascaded-calls nil) (php-extra-constants nil) (php-do-not-use-semantic-imenu t) (php-site-url https://secure.php.net/) (php-manual-url ja) (php-search-url nil) (php-completion-file ) (php-manual-path ) (php-mode-hook (my/php-mode-hook)) (php-mode-pear-hook nil) (php-mode-drupal-hook nil) (php-mode-wordpress-hook nil) (php-mode-symfony2-hook nil) (php-mode-psr2-hook nil) (php-mode-force-pear nil) (php-mode-warn-if-mumamo-off t) (php-mode-coding-style psr2) (php-mode-enable-project-coding-style nil) (php-mode-enable-backup-style-variables t) (php-search-documentation-browser-function nil) (php-class-suffix-when-insert ::) (php-namespace-suffix-when-insert \))
c-indentation-style: psr2
c-style-variables: ((c-basic-offset 4) (c-comment-only-line-offset 0) (c-indent-comment-alist ((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))) (c-indent-comments-syntactically-p t) (c-block-comment-prefix * ) (c-comment-prefix-regexp ((pike-mode . //+!?\|\**) (awk-mode . #+) (other . //+\|\**))) (c-cleanup-list (scope-operator)) (c-hanging-braces-alist ((brace-list-open) (brace-entry-open) (statement-cont) (substatement-open after) (block-close . c-snug-do-while) (extern-lang-open after) (namespace-open after) (module-open after) (composition-open after) (inexpr-class-open after) (inexpr-class-close before) (arglist-cont-nonempty))) (c-hanging-colons-alist nil) (c-hanging-semi&comma-criteria (c-semi&comma-inside-parenlist)) (c-backslash-column 48) (c-backslash-max-column 72) (c-special-indent-hook nil) (c-label-minimum-indentation 1))
c-doc-comment-style: ((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))
c-offsets-alist: ((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty first php-lineup-cascaded-calls c-lineup-arglist) (arglist-cont first php-lineup-cascaded-calls 0) (comment-intro . 0) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . +) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . c-lineup-under-anchor) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first php-lineup-cascaded-calls +) (brace-list-intro . +) (brace-list-open . 0) (inline-open . 0) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont . +) (statement-case-open . 0) (label . +) (substatement-label . 2) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +))
--- PHP-MODE DEBUG END ---

zonuexe avatar Apr 17 '18 13:04 zonuexe

Here is my php-mode-debug message:

Feel free to report on GitHub what you noticed! https://github.com/ejmr/php-mode/issues/new

Pasting the following information on the issue will help us to investigate the cause.

--- PHP-MODE DEBUG BEGIN ---
versions: GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09; PHP Mode 1.19.0 of 2018-03-28
package-version: 20180328.1051
major-mode: php-mode
minor-modes: (goto-address-prog-mode bug-reference-prog-mode auto-highlight-symbol-mode highlight-numbers-mode highlight-parentheses-mode rainbow-delimiters-mode company-mode yas-minor-mode projectile-mode recentf-mode hl-todo-mode spacemacs-whitespace-cleanup-mode winum-mode winner-mode volatile-highlights-mode vi-tilde-fringe-mode spaceline-info-mode spaceline-helm-mode save-place-mode savehist-mode popwin-mode persp-mode linum-mode Info-breadcrumbs-in-mode-line-mode git-gutter+-mode async-bytecomp-package-mode flycheck-pos-tip-mode flycheck-mode flx-ido-mode eyebrowse-mode evil-surround-mode evil-search-highlight-persist show-smartparens-mode smartparens-mode evil-escape-mode anzu-mode eval-sexp-fu-flash-mode diff-auto-refine-mode counsel-mode ivy-mode clean-aindent-mode which-key-mode undo-tree-mode shell-dirtrack-mode evil-mode evil-local-mode spacemacs-leader-override-mode xterm-mouse-mode ido-vertical-mode eldoc-mode electric-indent-mode mouse-wheel-mode file-name-shadow-mode font-lock-mode auto-composition-mode auto-encryption-mode auto-compression-mode column-number-mode line-number-mode transient-mark-mode abbrev-mode hs-minor-mode)
variables: ((indent-tabs-mode nil) (tab-width 2))
custom variables: ((php-executable /usr/bin/php) (php-default-face default) (php-speedbar-config t) (php-mode-speedbar-open nil) (php-template-compatibility t) (php-lineup-cascaded-calls nil) (php-extra-constants nil) (php-do-not-use-semantic-imenu t) (php-site-url https://secure.php.net/) (php-manual-url en) (php-search-url nil) (php-completion-file ) (php-manual-path ) (php-mode-hook (php-enable-default-coding-style php-enable-psr2-coding-style php-extras-completion-setup php-extras-autocomplete-setup php-extras-eldoc-setup eldoc-mode drupal-mode-bootstrap spacemacs//init-jump-handlers-php-mode spacemacs//init-company-php-mode company-mode)) (php-mode-pear-hook nil) (php-mode-drupal-hook nil) (php-mode-wordpress-hook nil) (php-mode-symfony2-hook nil) (php-mode-psr2-hook nil) (php-mode-force-pear nil) (php-mode-warn-if-mumamo-off t) (php-mode-coding-style psr2) (php-mode-enable-project-coding-style t) (php-mode-enable-backup-style-variables t) (php-search-documentation-browser-function nil) (php-class-suffix-when-insert ::) (php-namespace-suffix-when-insert \) (php-extras-insert-previous-variable-key [(control c) (control $)]) (php-extras-auto-complete-insert-parenthesis t))
c-indentation-style: psr2
c-style-variables: ((c-basic-offset 2) (c-comment-only-line-offset (0 . 0)) (c-indent-comment-alist ((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))) (c-indent-comments-syntactically-p t) (c-block-comment-prefix ) (c-comment-prefix-regexp ((pike-mode . //+!?\|\**) (awk-mode . #+) (other . //+\|\**))) (c-cleanup-list (scope-operator)) (c-hanging-braces-alist ((substatement-open before after) (arglist-cont-nonempty))) (c-hanging-colons-alist nil) (c-hanging-semi&comma-criteria (c-semi&comma-inside-parenlist)) (c-backslash-column 48) (c-backslash-max-column 72) (c-special-indent-hook (c-gnu-impose-minimum)) (c-label-minimum-indentation 1))
c-doc-comment-style: ((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))
c-offsets-alist: ((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty first php-lineup-cascaded-calls c-lineup-arglist) (arglist-cont first php-lineup-cascaded-calls 0) (comment-intro . 0) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . +) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first php-lineup-cascaded-calls +) (brace-list-open . 0) (inline-open . 0) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont . +) (statement-case-open . 0) (label . +) (substatement-label . 2) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +))
--- PHP-MODE DEBUG END ---

Thank you!

dbrw avatar Apr 17 '18 13:04 dbrw

Feel free to report on GitHub what you noticed! https://github.com/ejmr/php-mode/issues/new

Pasting the following information on the issue will help us to investigate the cause.

--- PHP-MODE DEBUG BEGIN ---
versions: GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.29)
 of 2018-03-30; PHP Mode 1.19.0 of 2018-03-28
package-version: nil
major-mode: php-mode
minor-modes: (linum-mode helm-mode show-paren-mode helm-fuzzier-mode projectile-mode column-enforce-mode smooth-scrolling-mode guide-key-mode yas-minor-mode eyebrowse-mode 0blayout-mode flycheck-mode diff-auto-refine-mode magit-auto-revert-mode async-bytecomp-package-mode shell-dirtrack-mode company-statistics-mode company-flx-mode company-mode tooltip-mode electric-indent-mode mouse-wheel-mode file-name-shadow-mode font-lock-mode blink-cursor-mode auto-composition-mode auto-encryption-mode auto-compression-mode column-number-mode line-number-mode transient-mark-mode abbrev-mode)
variables: ((indent-tabs-mode nil) (tab-width 8))
custom variables: ((php-executable /run/current-system/sw/bin/php) (php-default-face default) (php-speedbar-config t) (php-mode-speedbar-open nil) (php-template-compatibility t) (php-lineup-cascaded-calls nil) (php-extra-constants nil) (php-do-not-use-semantic-imenu t) (php-site-url https://secure.php.net/) (php-manual-url en) (php-search-url nil) (php-completion-file ) (php-manual-path ) (php-mode-hook (120-column-rule (lambda nil (unless (executable-find ctags) (error Program: ctags is missing)) (set (make-local-variable (quote company-backends)) (quote ((company-dabbrev-code company-gtags company-etags company-keywords company-ac-php-backend)))) (company-mode t)))) (php-mode-pear-hook nil) (php-mode-drupal-hook nil) (php-mode-wordpress-hook nil) (php-mode-symfony2-hook nil) (php-mode-psr2-hook nil) (php-mode-force-pear nil) (php-mode-warn-if-mumamo-off t) (php-mode-coding-style psr2) (php-mode-enable-project-coding-style nil) (php-mode-enable-backup-style-variables t) (php-search-documentation-browser-function nil) (php-class-suffix-when-insert ::) (php-namespace-suffix-when-insert \))
c-indentation-style: psr2
c-style-variables: ((c-basic-offset 2) (c-comment-only-line-offset (0 . 0)) (c-indent-comment-alist ((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))) (c-indent-comments-syntactically-p t) (c-block-comment-prefix ) (c-comment-prefix-regexp ((pike-mode . //+!?\|\**) (awk-mode . #+) (other . //+\|\**))) (c-cleanup-list (scope-operator)) (c-hanging-braces-alist ((substatement-open before after) (arglist-cont-nonempty))) (c-hanging-colons-alist nil) (c-hanging-semi&comma-criteria (c-semi&comma-inside-parenlist)) (c-backslash-column 48) (c-backslash-max-column 72) (c-special-indent-hook (c-gnu-impose-minimum)) (c-label-minimum-indentation 1))
c-doc-comment-style: ((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))
c-offsets-alist: ((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty first php-lineup-cascaded-calls c-lineup-arglist) (arglist-cont first php-lineup-cascaded-calls 0) (comment-intro . 0) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . +) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first php-lineup-cascaded-calls +) (brace-list-open . 0) (inline-open . 0) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont . +) (statement-case-open . 0) (label . +) (substatement-label . 2) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +))
--- PHP-MODE DEBUG END ---

Thank you!

etu avatar Apr 17 '18 13:04 etu

@etu @dbrw Thanks.

In @dbrw configuration php-mode-enable-project-coding-style is set to t. Since it often causes problems, it is now disabled by the variable. https://github.com/ejmr/php-mode/commit/cdd2fc926dd2abc3bbe3ac9fc1bf768f9c78eabb

In your init.el (or .emacs file) put the following code before starting php-mode (not hook).

(setq-default php-mode-enable-project-coding-style nil)

This value is nil for the @etu setting, so I have not yet figured out why his indentation is broken. I will investigate this cause again. I apologize that I am confusing users.

zonuexe avatar Apr 17 '18 14:04 zonuexe

@zonuexe I don't know if this help you, but this is my entire emacs config (except from a "bootstrap" to load the org-file): https://github.com/etu/nixconfig/blob/master/home-etu-nixpkgs/dotfiles/emacs/config.org

Bootstrap file: https://github.com/etu/nixconfig/blob/master/home-etu-nixpkgs/dotfiles/emacs/emacs.el

All deps are installed by home-manager in NixOS. And I have complete control of what version I run of php-mode so I can test things out easily.

etu avatar Apr 18 '18 05:04 etu

@zonuexe thanks for the leads but setting php-mode-enable-project-coding-style to nil is not helping it.

Here are the debug message after updating it:

--- PHP-MODE DEBUG BEGIN ---
versions: GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.26)
 of 2018-02-09; PHP Mode 1.19.0 of 2018-03-28
package-version: 20180328.1051
major-mode: php-mode
minor-modes: (ggtags-mode goto-address-prog-mode bug-reference-prog-mode auto-highlight-symbol-mode highlight-numbers-mode highlight-parentheses-mode rainbow-delimiters-mode company-mode yas-minor-mode projectile-mode recentf-mode hl-todo-mode spacemacs-whitespace-cleanup-mode winum-mode winner-mode volatile-highlights-mode vi-tilde-fringe-mode spaceline-info-mode spaceline-helm-mode save-place-mode savehist-mode popwin-mode persp-mode linum-mode Info-breadcrumbs-in-mode-line-mode git-gutter+-mode async-bytecomp-package-mode flycheck-pos-tip-mode flycheck-mode flx-ido-mode eyebrowse-mode evil-surround-mode evil-search-highlight-persist show-smartparens-mode smartparens-mode evil-escape-mode anzu-mode eval-sexp-fu-flash-mode diff-auto-refine-mode counsel-mode ivy-mode clean-aindent-mode which-key-mode undo-tree-mode shell-dirtrack-mode evil-mode evil-local-mode spacemacs-leader-override-mode xterm-mouse-mode ido-vertical-mode eldoc-mode electric-indent-mode mouse-wheel-mode file-name-shadow-mode font-lock-mode auto-composition-mode auto-encryption-mode auto-compression-mode column-number-mode line-number-mode transient-mark-mode abbrev-mode hs-minor-mode)
variables: ((indent-tabs-mode nil) (tab-width 2))
custom variables: ((php-extras-insert-previous-variable-key [(control c) (control $)]) (php-extras-auto-complete-insert-parenthesis t) (php-executable /usr/bin/php) (php-default-face default) (php-speedbar-config t) (php-mode-speedbar-open nil) (php-template-compatibility t) (php-lineup-cascaded-calls nil) (php-extra-constants nil) (php-do-not-use-semantic-imenu t) (php-site-url https://secure.php.net/) (php-manual-url en) (php-search-url nil) (php-completion-file ) (php-manual-path ) (php-mode-hook (php-enable-psr2-coding-style php-enable-default-coding-style php-extras-completion-setup php-extras-autocomplete-setup php-extras-eldoc-setup eldoc-mode drupal-mode-bootstrap spacemacs//init-jump-handlers-php-mode spacemacs//init-company-php-mode company-mode)) (php-mode-pear-hook nil) (php-mode-drupal-hook nil) (php-mode-wordpress-hook nil) (php-mode-symfony2-hook nil) (php-mode-psr2-hook nil) (php-mode-force-pear nil) (php-mode-warn-if-mumamo-off t) (php-mode-coding-style pear) (php-mode-enable-project-coding-style nil) (php-mode-enable-backup-style-variables t) (php-search-documentation-browser-function nil) (php-class-suffix-when-insert ::) (php-namespace-suffix-when-insert \))
c-indentation-style: php
c-style-variables: ((c-basic-offset 2) (c-comment-only-line-offset (0 . 0)) (c-indent-comment-alist ((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))) (c-indent-comments-syntactically-p nil) (c-block-comment-prefix ) (c-comment-prefix-regexp ((pike-mode . //+!?\|\**) (awk-mode . #+) (other . //+\|\**))) (c-cleanup-list (scope-operator)) (c-hanging-braces-alist ((substatement-open before after) (arglist-cont-nonempty))) (c-hanging-colons-alist nil) (c-hanging-semi&comma-criteria (c-semi&comma-inside-parenlist)) (c-backslash-column 48) (c-backslash-max-column 72) (c-special-indent-hook (c-gnu-impose-minimum)) (c-label-minimum-indentation 1))
c-doc-comment-style: ((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))
c-offsets-alist: ((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty first php-lineup-cascaded-calls c-lineup-arglist) (arglist-cont first php-lineup-cascaded-calls 0) (comment-intro . 0) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . +) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first php-lineup-cascaded-calls +) (brace-list-open . 0) (inline-open . 0) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont first php-lineup-cascaded-calls php-lineup-string-cont +) (statement-case-open . 0) (label . +) (substatement-label . 2) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +))
--- PHP-MODE DEBUG END ---

dbrw avatar Apr 18 '18 12:04 dbrw

I've now updated to ef69a8b63f70a89694087ab0f97545d103ad952c, and this issue does not appear there.

New dump:

Feel free to report on GitHub what you noticed! https://github.com/ejmr/php-mode/issues/new

Pasting the following information on the issue will help us to investigate the cause.

--- PHP-MODE DEBUG BEGIN ---
versions: GNU Emacs 25.3.1 (x86_64-pc-linux-gnu, GTK+ Version 3.22.29)
 of 2018-04-25; PHP Mode 1.19.0 of 2018-04-08
package-version: nil
major-mode: php-mode
minor-modes: (linum-mode helm-mode show-paren-mode helm-fuzzier-mode projectile-mode column-enforce-mode smooth-scrolling-mode guide-key-mode yas-minor-mode eyebrowse-mode 0blayout-mode flycheck-mode diff-auto-refine-mode magit-auto-revert-mode async-bytecomp-package-mode shell-dirtrack-mode company-statistics-mode company-flx-mode company-mode tooltip-mode electric-indent-mode mouse-wheel-mode file-name-shadow-mode font-lock-mode blink-cursor-mode auto-composition-mode auto-encryption-mode auto-compression-mode column-number-mode line-number-mode transient-mark-mode abbrev-mode)
variables: ((indent-tabs-mode nil) (tab-width 8))
custom variables: ((php-executable /run/current-system/sw/bin/php) (php-default-face default) (php-speedbar-config t) (php-mode-speedbar-open nil) (php-template-compatibility t) (php-lineup-cascaded-calls nil) (php-extra-constants nil) (php-do-not-use-semantic-imenu t) (php-site-url https://secure.php.net/) (php-manual-url en) (php-search-url nil) (php-completion-file ) (php-manual-path ) (php-mode-hook (120-column-rule (lambda nil (unless (executable-find ctags) (error Program: ctags is missing)) (set (make-local-variable (quote company-backends)) (quote ((company-dabbrev-code company-gtags company-etags company-keywords company-ac-php-backend)))) (company-mode t)))) (php-mode-pear-hook nil) (php-mode-drupal-hook nil) (php-mode-wordpress-hook nil) (php-mode-symfony2-hook nil) (php-mode-psr2-hook nil) (php-mode-force-pear nil) (php-mode-warn-if-mumamo-off t) (php-mode-coding-style psr2) (php-mode-enable-project-coding-style nil) (php-mode-enable-backup-style-variables t) (php-search-documentation-browser-function nil) (php-class-suffix-when-insert ::) (php-namespace-suffix-when-insert \))
c-indentation-style: psr2
c-style-variables: ((c-basic-offset 4) (c-comment-only-line-offset 0) (c-indent-comment-alist ((anchored-comment column . 0) (end-block space . 1) (cpp-end-block space . 2))) (c-indent-comments-syntactically-p t) (c-block-comment-prefix * ) (c-comment-prefix-regexp ((pike-mode . //+!?\|\**) (awk-mode . #+) (other . //+\|\**))) (c-cleanup-list (scope-operator)) (c-hanging-braces-alist ((brace-list-open) (brace-entry-open) (statement-cont) (substatement-open after) (block-close . c-snug-do-while) (extern-lang-open after) (namespace-open after) (module-open after) (composition-open after) (inexpr-class-open after) (inexpr-class-close before) (arglist-cont-nonempty))) (c-hanging-colons-alist nil) (c-hanging-semi&comma-criteria (c-semi&comma-inside-parenlist)) (c-backslash-column 48) (c-backslash-max-column 72) (c-special-indent-hook nil) (c-label-minimum-indentation 1))
c-doc-comment-style: ((java-mode . javadoc) (pike-mode . autodoc) (c-mode . gtkdoc))
c-offsets-alist: ((inexpr-class . +) (inexpr-statement . +) (lambda-intro-cont . +) (inlambda . 0) (template-args-cont c-lineup-template-args +) (incomposition . +) (inmodule . +) (innamespace . +) (inextern-lang . +) (composition-close . 0) (module-close . 0) (namespace-close . 0) (extern-lang-close . 0) (composition-open . 0) (module-open . 0) (namespace-open . 0) (extern-lang-open . 0) (objc-method-call-cont c-lineup-ObjC-method-call-colons c-lineup-ObjC-method-call +) (objc-method-args-cont . c-lineup-ObjC-method-args) (objc-method-intro . [0]) (friend . 0) (cpp-define-intro c-lineup-cpp-define +) (cpp-macro-cont . +) (cpp-macro . [0]) (inclass . +) (stream-op . c-lineup-streamop) (arglist-cont-nonempty first php-lineup-cascaded-calls c-lineup-arglist) (arglist-cont first php-lineup-cascaded-calls 0) (comment-intro . 0) (catch-clause . 0) (else-clause . 0) (do-while-closure . 0) (access-label . -) (case-label . +) (substatement . +) (statement-case-intro . +) (statement . 0) (brace-entry-open . 0) (brace-list-entry . 0) (brace-list-intro . +) (brace-list-close . 0) (block-close . 0) (block-open . 0) (inher-cont . c-lineup-multi-inher) (inher-intro . +) (member-init-cont . c-lineup-multi-inher) (member-init-intro . +) (annotation-var-cont . +) (annotation-top-cont . 0) (topmost-intro . 0) (knr-argdecl . 0) (func-decl-cont . +) (inline-close . 0) (class-close . 0) (class-open . 0) (defun-block-intro . +) (defun-close . 0) (defun-open . 0) (c . c-lineup-C-comments) (string . c-lineup-dont-change) (topmost-intro-cont first php-lineup-cascaded-calls +) (brace-list-open . 0) (inline-open . 0) (arglist-close . php-lineup-arglist-close) (arglist-intro . php-lineup-arglist-intro) (statement-cont . +) (statement-case-open . 0) (label . +) (substatement-label . 2) (substatement-open . 0) (knr-argdecl-intro . +) (statement-block-intro . +))
--- PHP-MODE DEBUG END ---

Thank you!

etu avatar Apr 29 '18 15:04 etu

problem still present for me, see details here:

https://github.com/emacs-php/php-mode/issues/398#issuecomment-454422541

oschonrock avatar Jan 19 '19 14:01 oschonrock

If you still have this issue, please report it again. Thank you.

zonuexe avatar Oct 27 '22 16:10 zonuexe