diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/CodeUtils.java b/php/php.editor/src/org/netbeans/modules/php/editor/CodeUtils.java index 51c94864a2d2..a04f2c55751e 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/CodeUtils.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/CodeUtils.java @@ -901,4 +901,9 @@ public static boolean isDnfType(UnionType unionType) { } return false; } + + public static boolean isTypeDeclaration(ASTNode node) { + return node instanceof TypeDeclaration + || ((node instanceof ClassInstanceCreation) && ((ClassInstanceCreation) node).isAnonymous()); + } } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/PredefinedSymbols.java b/php/php.editor/src/org/netbeans/modules/php/editor/PredefinedSymbols.java index 7dce424375ed..b6c917a000c1 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/PredefinedSymbols.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/PredefinedSymbols.java @@ -121,6 +121,7 @@ public static enum VariableKind { public static enum Attributes { ATTRIBUTE("Attribute"), // NOI18N ALLOW_DYNAMIC_PROPERTIES("AllowDynamicProperties"), // NOI18N + DEPRECATED("Deprecated"), // NOI18N OVERRIDE("Override"), // NOI18N RETURN_TYPE_WILL_CHANGE("ReturnTypeWillChange"), // NOI18N SENSITIVE_PARAMETER("SensitiveParameter"), // NOI18N diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java b/php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java index 2ce27d175938..24a357c62325 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/csl/SemanticAnalysis.java @@ -22,9 +22,11 @@ import java.util.Collections; import java.util.EnumSet; import java.util.HashMap; +import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Set; +import java.util.logging.Level; import java.util.logging.Logger; import org.netbeans.modules.csl.api.ColoringAttributes; import org.netbeans.modules.csl.api.OffsetRange; @@ -36,12 +38,6 @@ import org.netbeans.modules.php.editor.CodeUtils; import org.netbeans.modules.php.editor.api.NameKind; import org.netbeans.modules.php.editor.api.QualifiedName; -import org.netbeans.modules.php.editor.api.elements.ElementFilter; -import org.netbeans.modules.php.editor.api.elements.EnumCaseElement; -import org.netbeans.modules.php.editor.api.elements.FieldElement; -import org.netbeans.modules.php.editor.api.elements.FunctionElement; -import org.netbeans.modules.php.editor.api.elements.MethodElement; -import org.netbeans.modules.php.editor.api.elements.TypeConstantElement; import org.netbeans.modules.php.editor.api.elements.TypeElement; import org.netbeans.modules.php.editor.model.Model; import org.netbeans.modules.php.editor.model.VariableScope; @@ -170,7 +166,7 @@ void process(Result r) { PHPParseResult result = (PHPParseResult) r; Map> highlights = new HashMap<>(100); if (result.getProgram() != null) { - SemanticHighlightVisitor semanticHighlightVisitor = new SemanticHighlightVisitor(highlights, result.getSnapshot(), result.getModel()); + SemanticHighlightVisitor semanticHighlightVisitor = new SemanticHighlightVisitor(highlights, result.getSnapshot(), result.getModel(), result.getProgram()); result.getProgram().accept(semanticHighlightVisitor); if (!highlights.isEmpty()) { semanticHighlights = highlights; @@ -228,94 +224,61 @@ public ASTNodeColoring(ASTNode identifier, Set coloring) { private final Map privateUnusedMethods; // this is holder of blocks, which has to be scanned for usages in the class. private final Map> needToScan = new HashMap<>(); - private final Snapshot snapshot; - private final Model model; - - private Set deprecatedTypes; - - private Set deprecatedMethods; - - private Set deprecatedFields; - - private Set deprecatedConstants; - - private Set deprecatedEnumCases; - - private Set deprecatedFunctions; - + private final Program program; + private Set deprecatedTypes; // last visited type declaration private TypeInfo typeInfo; - - public SemanticHighlightVisitor(Map> highlights, Snapshot snapshot, Model model) { + public SemanticHighlightVisitor(Map> highlights, Snapshot snapshot, Model model, Program program) { this.highlights = highlights; privateUnusedConstants = new HashMap<>(); privateFieldsUnused = new HashMap<>(); privateUnusedMethods = new HashMap<>(); this.snapshot = snapshot; this.model = model; + this.program = program; } - private Set getDeprecatedTypes() { + private Set getDeprecatedTypes() { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } if (deprecatedTypes == null) { - deprecatedTypes = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getTypes(NameKind.empty())); + deprecatedTypes = getDeprecatedFQTypeNames(); } return Collections.unmodifiableSet(deprecatedTypes); } - private Set getDeprecatedMethods() { - if (isCancelled()) { - return Collections.EMPTY_SET; - } - if (deprecatedMethods == null) { - deprecatedMethods = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getMethods(NameKind.empty())); - } - return Collections.unmodifiableSet(deprecatedMethods); - } - - private Set getDeprecatedFunctions() { - if (isCancelled()) { - return Collections.EMPTY_SET; - } - if (deprecatedFunctions == null) { - deprecatedFunctions = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getFunctions(NameKind.empty())); - } - return Collections.unmodifiableSet(deprecatedFunctions); - } - - private Set getDeprecatedFields() { - if (isCancelled()) { - return Collections.EMPTY_SET; - } - if (deprecatedFields == null) { - deprecatedFields = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getFields(NameKind.empty())); - } - return Collections.unmodifiableSet(deprecatedFields); - } - - private Set getDeprecatedConstants() { + private Set getDeprecatedFQTypeNames() { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } - if (deprecatedConstants == null) { - deprecatedConstants = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getTypeConstants(NameKind.empty())); + Set names = new HashSet<>(); + Set types = model.getIndexScope().getIndex().getTypes(NameKind.empty()); + for (TypeElement type : types) { + if (type.isDeprecated()) { + names.add(type.getFullyQualifiedName()); + } } - return Collections.unmodifiableSet(deprecatedConstants); + return names; } - private Set getDeprecatedEnumCases() { - if (isCancelled()) { - return Collections.EMPTY_SET; - } - if (deprecatedEnumCases == null) { - deprecatedEnumCases = ElementFilter.forDeprecated(true).filter(model.getIndexScope().getIndex().getEnumCases(NameKind.empty())); + private boolean isDeprecatedDeclaration(ASTNode node) { + boolean isDeprecated = false; + if (!isCancelled() && isResolveDeprecatedElements()) { + long startTime = 0; + if (LOGGER.isLoggable(Level.FINE)) { + startTime = System.currentTimeMillis(); + } + isDeprecated = VariousUtils.isDeprecated(model.getFileScope(), program, node); + if (LOGGER.isLoggable(Level.FINE)) { + long time = System.currentTimeMillis() - startTime; + LOGGER.fine(String.format("isDeprecatedDeclaration() took %d ms", time)); // NOI18N + } } - return Collections.unmodifiableSet(deprecatedEnumCases); + return isDeprecated; } private void addColoringForNode(ASTNode node, Set coloring) { @@ -408,7 +371,7 @@ public void visit(ClassDeclaration cldec) { scan(cldec.getSuperClass()); scan(cldec.getInterfaces()); Identifier name = cldec.getName(); - addColoringForNode(name, createTypeNameColoring(name)); + addColoringForNode(name, createTypeNameColoring(cldec)); needToScan.put(typeInfo, new ArrayList<>()); if (cldec.getBody() != null) { cldec.getBody().accept(this); @@ -422,12 +385,12 @@ public void visit(ClassDeclaration cldec) { removeFromPath(); } - private Set createTypeNameColoring(Identifier typeName) { + private Set createTypeNameColoring(TypeDeclaration typeDeclaration) { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } Set result; - if (isDeprecatedTypeDeclaration(typeName)) { + if (isDeprecatedDeclaration(typeDeclaration)) { result = DEPRECATED_CLASS_SET; } else { result = ColoringAttributes.CLASS_SET; @@ -435,46 +398,18 @@ private Set createTypeNameColoring(Identifier typeName) { return result; } - private boolean isDeprecatedTypeDeclaration(Identifier typeName) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - VariableScope variableScope = model.getVariableScope(typeName.getStartOffset()); - QualifiedName fullyQualifiedName = VariousUtils.getFullyQualifiedName(QualifiedName.create(typeName), typeName.getStartOffset(), variableScope); - for (TypeElement typeElement : getDeprecatedTypes()) { - if (typeElement.getFullyQualifiedName().equals(fullyQualifiedName)) { - isDeprecated = true; - break; - } - } - } - return isDeprecated; - } - @Override public void visit(FunctionDeclaration node) { if (isCancelled()) { return; } Identifier functionName = node.getFunctionName(); - if (isDeprecatedFunctionDeclaration(functionName)) { + if (isDeprecatedDeclaration(node)) { addColoringForNode(functionName, DEPRECATED_SET); } super.visit(node); } - private boolean isDeprecatedFunctionDeclaration(Identifier functionName) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - for (FunctionElement functionElement : getDeprecatedFunctions()) { - if (functionElement.getName().equals(functionName.getName())) { - isDeprecated = true; - break; - } - } - } - return isDeprecated; - } - @Override public void visit(MethodDeclaration md) { if (isCancelled()) { @@ -521,9 +456,9 @@ public void visit(MethodDeclaration md) { private Set createMethodDeclarationColoring(MethodDeclaration methodDeclaration) { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } - boolean isDeprecated = isDeprecatedMethodDeclaration(methodDeclaration.getFunction().getFunctionName()); + boolean isDeprecated = isDeprecatedDeclaration(methodDeclaration); Set coloring = isDeprecated ? DEPRECATED_METHOD_SET : ColoringAttributes.METHOD_SET; if (Modifier.isStatic(methodDeclaration.getModifier())) { coloring = isDeprecated ? DEPRECATED_STATIC_METHOD_SET : STATIC_METHOD_SET; @@ -531,24 +466,6 @@ private Set createMethodDeclarationColoring(MethodDeclaratio return coloring; } - private boolean isDeprecatedMethodDeclaration(Identifier methodName) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - VariableScope variableScope = model.getVariableScope(methodName.getStartOffset()); - QualifiedName typeFullyQualifiedName = VariousUtils.getFullyQualifiedName( - QualifiedName.create(typeInfo.getName()), - methodName.getStartOffset(), - variableScope); - for (MethodElement methodElement : getDeprecatedMethods()) { - if (methodElement.getName().equals(methodName.getName()) && methodElement.getType().getFullyQualifiedName().equals(typeFullyQualifiedName)) { - isDeprecated = true; - break; - } - } - } - return isDeprecated; - } - @Override public void visit(TraitMethodAliasDeclaration node) { if (isCancelled()) { @@ -624,7 +541,7 @@ public void visit(InterfaceDeclaration node) { } typeInfo = new TypeDeclarationTypeInfo(node); Identifier name = node.getName(); - addColoringForNode(name, createTypeNameColoring(name)); + addColoringForNode(name, createTypeNameColoring(node)); super.visit(node); } @@ -637,7 +554,7 @@ public void visit(TraitDeclaration node) { scan(node.getAttributes()); typeInfo = new TypeDeclarationTypeInfo(node); Identifier name = node.getName(); - addColoringForNode(name, createTypeNameColoring(name)); + addColoringForNode(name, createTypeNameColoring(node)); needToScan.put(typeInfo, new ArrayList<>()); if (node.getBody() != null) { node.getBody().accept(this); @@ -658,7 +575,7 @@ public void visit(EnumDeclaration node) { scan(node.getInterfaces()); typeInfo = new TypeDeclarationTypeInfo(node); Identifier name = node.getName(); - addColoringForNode(name, createTypeNameColoring(name)); + addColoringForNode(name, createTypeNameColoring(node)); needToScan.put(typeInfo, new ArrayList<>()); if (node.getBody() != null) { node.getBody().accept(this); @@ -679,7 +596,7 @@ public void visit(FieldsDeclaration node) { Variable[] variables = node.getVariableNames(); for (int i = 0; i < variables.length; i++) { Variable variable = variables[i]; - Set coloring = createFieldDeclarationColoring(variable, isStatic); + Set coloring = createFieldDeclarationColoring(node, isStatic); // in case of trait, just ignore it because it may be used in other classes if (!isPrivate || typeInfo.isTrait()) { @@ -694,11 +611,11 @@ public void visit(FieldsDeclaration node) { super.visit(node); } - private Set createFieldDeclarationColoring(Variable variable, boolean isStatic) { + private Set createFieldDeclarationColoring(FieldsDeclaration fieldsDeclaration, boolean isStatic) { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } - boolean isDeprecated = isDeprecatedFieldDeclaration(variable); + boolean isDeprecated = isDeprecatedDeclaration(fieldsDeclaration); Set coloring = isDeprecated ? DEPRECATED_FIELD_SET : ColoringAttributes.FIELD_SET; if (isStatic) { coloring = isDeprecated ? DEPRECATED_STATIC_FIELD_SET : ColoringAttributes.STATIC_FIELD_SET; @@ -706,25 +623,6 @@ private Set createFieldDeclarationColoring(Variable variable return coloring; } - private boolean isDeprecatedFieldDeclaration(Variable variable) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - String variableName = CodeUtils.extractVariableName(variable); - VariableScope variableScope = model.getVariableScope(variable.getStartOffset()); - QualifiedName typeFullyQualifiedName = VariousUtils.getFullyQualifiedName( - QualifiedName.create(typeInfo.getName()), - variable.getStartOffset(), - variableScope); - for (FieldElement fieldElement : getDeprecatedFields()) { - if (fieldElement.getName().equals(variableName) && fieldElement.getType().getFullyQualifiedName().equals(typeFullyQualifiedName)) { - isDeprecated = true; - break; - } - } - } - return isDeprecated; - } - @Override public void visit(FieldAccess node) { if (isCancelled()) { @@ -808,15 +706,11 @@ public void visit(ConstantDeclaration node) { if (path != null && path.size() > 1) { parentNode = path.get(1); } - if (parentNode instanceof ClassDeclaration - || parentNode instanceof InterfaceDeclaration - || parentNode instanceof TraitDeclaration - || parentNode instanceof ClassInstanceCreation - || parentNode instanceof EnumDeclaration) { + if (CodeUtils.isTypeDeclaration(parentNode)) { boolean isPrivate = Modifier.isPrivate(node.getModifier()); List names = node.getNames(); for (Identifier identifier : names) { - Set coloring = createConstantDeclarationColoring(identifier); + Set coloring = createConstantDeclarationColoring(node); if (!isPrivate || parentNode instanceof TraitDeclaration) { addColoringForNode(identifier, coloring); } else { @@ -845,60 +739,24 @@ public void visit(CaseDeclaration node) { } if (parentNode instanceof EnumDeclaration) { Identifier identifier = node.getName(); - Set coloring = createEnumCaseDeclarationColoring(identifier); + Set coloring = createEnumCaseDeclarationColoring(node); addColoringForNode(identifier, coloring); } super.visit(node); } - private Set createConstantDeclarationColoring(Identifier constantName) { + private Set createConstantDeclarationColoring(ConstantDeclaration constant) { if (isCancelled()) { - return Collections.EMPTY_SET; + return Collections.emptySet(); } - return isDeprecatedConstantDeclaration(constantName) ? DEPRECATED_STATIC_FIELD_SET : ColoringAttributes.STATIC_FIELD_SET; + return isDeprecatedDeclaration(constant) ? DEPRECATED_STATIC_FIELD_SET : ColoringAttributes.STATIC_FIELD_SET; } - private Set createEnumCaseDeclarationColoring(Identifier constantName) { + private Set createEnumCaseDeclarationColoring(CaseDeclaration caseDeclaration) { if (isCancelled()) { - return Collections.EMPTY_SET; - } - return isDeprecatedEnumCaseDeclaration(constantName) ? DEPRECATED_STATIC_FIELD_SET : ColoringAttributes.STATIC_FIELD_SET; - } - - private boolean isDeprecatedConstantDeclaration(Identifier constantName) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - VariableScope variableScope = model.getVariableScope(constantName.getStartOffset()); - QualifiedName typeFullyQualifiedName = VariousUtils.getFullyQualifiedName( - QualifiedName.create(typeInfo.getName()), - constantName.getStartOffset(), - variableScope); - for (TypeConstantElement constantElement : getDeprecatedConstants()) { - if (constantElement.getName().equals(constantName.getName()) && constantElement.getType().getFullyQualifiedName().equals(typeFullyQualifiedName)) { - isDeprecated = true; - break; - } - } - } - return isDeprecated; - } - - private boolean isDeprecatedEnumCaseDeclaration(Identifier constantName) { - boolean isDeprecated = false; - if (!isCancelled() && isResolveDeprecatedElements()) { - VariableScope variableScope = model.getVariableScope(constantName.getStartOffset()); - QualifiedName typeFullyQualifiedName = VariousUtils.getFullyQualifiedName( - QualifiedName.create(typeInfo.getName()), - constantName.getStartOffset(), - variableScope); - for (EnumCaseElement enumCaseElement : getDeprecatedEnumCases()) { - if (enumCaseElement.getName().equals(constantName.getName()) && enumCaseElement.getType().getFullyQualifiedName().equals(typeFullyQualifiedName)) { - isDeprecated = true; - break; - } - } + return Collections.emptySet(); } - return isDeprecated; + return isDeprecatedDeclaration(caseDeclaration) ? DEPRECATED_STATIC_FIELD_SET : ColoringAttributes.STATIC_FIELD_SET; } @Override @@ -952,12 +810,7 @@ private boolean isDeprecatedType(QualifiedName qualifiedName, int offset) { if (!isCancelled() && isResolveDeprecatedElements()) { VariableScope variableScope = model.getVariableScope(offset); QualifiedName fullyQualifiedName = VariousUtils.getFullyQualifiedName(qualifiedName, offset, variableScope); - for (TypeElement typeElement : getDeprecatedTypes()) { - if (typeElement.getFullyQualifiedName().equals(fullyQualifiedName)) { - isDeprecated = true; - break; - } - } + isDeprecated = getDeprecatedTypes().contains(fullyQualifiedName); } return isDeprecated; } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/elements/CaseElementImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/elements/CaseElementImpl.java index 2e3c1ff97f37..d93bb02ad1c7 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/elements/CaseElementImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/elements/CaseElementImpl.java @@ -125,7 +125,7 @@ public static EnumCaseElement fromNode(final TypeElement type, CaseDeclaration n info.getAccessModifiers().toFlags(), fileQuery.getURL().toExternalForm(), fileQuery, - VariousUtils.isDeprecatedFromPHPDoc(fileQuery.getResult().getProgram(), node), + VariousUtils.isDeprecated(fileQuery.getResult().getModel().getFileScope(), fileQuery.getResult().getProgram(), node), isBacked ); } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/elements/FunctionElementImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/elements/FunctionElementImpl.java index 03320a9a1265..d2f459c9851f 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/elements/FunctionElementImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/elements/FunctionElementImpl.java @@ -104,7 +104,7 @@ public static FunctionElement fromNode(final NamespaceElement namespace, final F fullyQualifiedName.append(info.getName()), info.getRange().getStart(), fileQuery.getURL().toExternalForm(), fileQuery, BaseFunctionElementSupport.ParametersImpl.create(info.getParameters()), BaseFunctionElementSupport.ReturnTypesImpl.create(TypeResolverImpl.parseTypes(VariousUtils.getReturnType(fileQuery.getResult().getProgram(), node)), node.getReturnType()), - VariousUtils.isDeprecatedFromPHPDoc(fileQuery.getResult().getProgram(), node)); + VariousUtils.isDeprecated(fileQuery.getResult().getModel().getFileScope(), fileQuery.getResult().getProgram(), node)); } private static boolean matchesQuery(final NameKind query, FunctionSignatureParser signParser) { diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/elements/MethodElementImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/elements/MethodElementImpl.java index 7c76b54b78de..3dfe8bf79ef2 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/elements/MethodElementImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/elements/MethodElementImpl.java @@ -238,7 +238,7 @@ public static MethodElement fromNode(final TypeElement type, final MethodDeclara BaseFunctionElementSupport.ParametersImpl.create(info.getParameters()), BaseFunctionElementSupport.ReturnTypesImpl.create( TypeResolverImpl.parseTypes(VariousUtils.getReturnType(fileQuery.getResult().getProgram(), node.getFunction())), node.getFunction().getReturnType()), - VariousUtils.isDeprecatedFromPHPDoc(fileQuery.getResult().getProgram(), node.getFunction())); + VariousUtils.isDeprecated(fileQuery.getResult().getModel().getFileScope(), fileQuery.getResult().getProgram(), node.getFunction())); } private static boolean matchesQuery(final NameKind query, MethodSignatureParser signParser) { diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/elements/TypeConstantElementImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/elements/TypeConstantElementImpl.java index ef159424971b..21f4071908ed 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/elements/TypeConstantElementImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/elements/TypeConstantElementImpl.java @@ -154,7 +154,7 @@ public static Set fromNode(final TypeElement type, Constant retval.add(new TypeConstantElementImpl( type, info.getDeclaredType(), info.getName(), info.getValue(), info.getRange().getStart(), info.getAccessModifiers().toFlags(), fileQuery.getURL().toExternalForm(), fileQuery, - VariousUtils.isDeprecatedFromPHPDoc(fileQuery.getResult().getProgram(), node))); + VariousUtils.isDeprecated(fileQuery.getResult().getModel().getFileScope(), fileQuery.getResult().getProgram(), node))); } return retval; } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelBuilder.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelBuilder.java index 3f3c43c466b2..baccb782f48e 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelBuilder.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/ModelBuilder.java @@ -316,7 +316,7 @@ static EnumScopeImpl create(EnumDeclarationInfo nodeInfo, ModelBuilder context) static MethodScopeImpl create(MethodDeclarationInfo nodeInfo, ModelBuilder context, ModelVisitor visitor) { String returnType = VariousUtils.getReturnType(context.getProgram(), nodeInfo.getOriginalNode().getFunction()); - boolean isDeprecated = VariousUtils.isDeprecatedFromPHPDoc(context.getProgram(), nodeInfo.getOriginalNode().getFunction()); + boolean isDeprecated = VariousUtils.isDeprecated(context.getFileScope(), context.getProgram(), nodeInfo.getOriginalNode()); String qualifiedReturnType = VariousUtils.qualifyTypeNames(returnType, nodeInfo.getOriginalNode().getStartOffset(), context.getCurrentScope()); MethodScopeImpl method = new MethodScopeImpl(context.getCurrentScope(), qualifiedReturnType, nodeInfo, visitor, isDeprecated); return method; @@ -341,12 +341,12 @@ static FieldElementImpl create(SingleFieldDeclarationInfo nodeInfo, ModelBuilder } static ClassConstantElementImpl create(ClassConstantDeclarationInfo clsConst, ModelBuilder context) { - boolean isDeprecated = VariousUtils.isDeprecatedFromPHPDoc(context.getProgram(), clsConst.getOriginalNode()); + boolean isDeprecated = VariousUtils.isDeprecated(context.getFileScope(), context.getProgram(), clsConst.getConstantDeclaration()); return new ClassConstantElementImpl(context.getCurrentScope(), clsConst, isDeprecated); } static CaseElementImpl create(CaseDeclarationInfo enumCase, ModelBuilder context) { - boolean isDeprecated = VariousUtils.isDeprecatedFromPHPDoc(context.getProgram(), enumCase.getOriginalNode()); + boolean isDeprecated = VariousUtils.isDeprecated(context.getFileScope(), context.getProgram(), enumCase.getCaseDeclaration()); return new CaseElementImpl(context.getCurrentScope(), enumCase, isDeprecated); } } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/NamespaceScopeImpl.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/NamespaceScopeImpl.java index da5d83b59a8f..24ae4b1a6ead 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/NamespaceScopeImpl.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/NamespaceScopeImpl.java @@ -94,7 +94,7 @@ FunctionScopeImpl createElement(Program program, FunctionDeclaration node) { qualifiedReturnType = VariousUtils.qualifyTypeNames(VariousUtils.getReturnType(program, node), returnType.getStartOffset(), this); } FunctionScopeImpl retval = new FunctionScopeImpl(this, FunctionDeclarationInfo.create(program, node), - qualifiedReturnType, VariousUtils.isDeprecatedFromPHPDoc(program, node)); + qualifiedReturnType, VariousUtils.isDeprecated(getFileScope(), program, node)); return retval; } diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/VariousUtils.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/VariousUtils.java index a61b2353b1da..7c1be978657b 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/VariousUtils.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/impl/VariousUtils.java @@ -33,11 +33,14 @@ import java.util.Stack; import java.util.regex.Pattern; import org.netbeans.api.annotations.common.CheckForNull; +import org.netbeans.api.annotations.common.NullAllowed; import org.netbeans.api.lexer.Token; import org.netbeans.api.lexer.TokenSequence; import org.netbeans.api.lexer.TokenUtilities; import org.netbeans.modules.php.api.util.StringUtils; import org.netbeans.modules.php.editor.CodeUtils; +import org.netbeans.modules.php.editor.PredefinedSymbols.Attributes; +import static org.netbeans.modules.php.editor.PredefinedSymbols.Attributes.DEPRECATED; import org.netbeans.modules.php.editor.api.AliasedName; import org.netbeans.modules.php.editor.api.PhpModifiers; import org.netbeans.modules.php.editor.api.QualifiedName; @@ -69,6 +72,9 @@ import org.netbeans.modules.php.editor.parser.astnodes.AnonymousObjectVariable; import org.netbeans.modules.php.editor.parser.astnodes.ArrayCreation; import org.netbeans.modules.php.editor.parser.astnodes.Assignment; +import org.netbeans.modules.php.editor.parser.astnodes.Attribute; +import org.netbeans.modules.php.editor.parser.astnodes.AttributeDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.Attributed; import org.netbeans.modules.php.editor.parser.astnodes.ClassInstanceCreation; import org.netbeans.modules.php.editor.parser.astnodes.ClassInstanceCreationVariable; import org.netbeans.modules.php.editor.parser.astnodes.ClassName; @@ -358,6 +364,61 @@ public static boolean isDeprecatedFromPHPDoc(Program root, ASTNode node) { return getDeprecatedDescriptionFromPHPDoc(root, node) != null; } + public static boolean isDeprecatedFromAttribute(FileScope fileScope, Program root, ASTNode node) { + if (node instanceof Attributed) { + List attributes = ((Attributed) node).getAttributes(); + for (Attribute attribute : attributes) { + for (AttributeDeclaration attributeDeclaration : attribute.getAttributeDeclarations()) { + String attributeName = CodeUtils.extractQualifiedName(attributeDeclaration.getAttributeName()); + if (isPredefinedAttributeName(DEPRECATED, attributeName, fileScope, attributeDeclaration.getStartOffset())) { + return true; + } + } + } + } + return false; + } + + public static boolean isDeprecated(FileScope fileScope, Program root, ASTNode node) { + if (isDeprecatedFromAttribute(fileScope, root, node)) { + return true; + } + return isDeprecatedFromPHPDoc(root, node); + } + + public static boolean isPredefinedAttributeName(Attributes attribute, String attributeName, FileScope fileScope, int offset) { + if (attribute.getFqName().equals(attributeName)) { + return true; + } + if (attribute.getName().equals(attributeName)) { + List declaredNamespaces = new ArrayList(fileScope.getDeclaredNamespaces()); + Collections.sort(declaredNamespaces, (n1, n2) -> -Integer.compare(n1.getOffset(), n2.getOffset())); + NamespaceScope namespaceScope = null; + for (NamespaceScope declaredNamespace : declaredNamespaces) { + int namespaceOffset = declaredNamespace.getOffset(); + if (namespaceOffset < offset) { + namespaceScope = declaredNamespace; + break; + } + } + // check FQ name because there may be `use \AttributeName;` + if (isPredefinedAttributeName(attribute, attributeName, namespaceScope, offset)) { + return true; + } + } + return false; + } + + private static boolean isPredefinedAttributeName(Attributes attribute, String attributeName, @NullAllowed NamespaceScope namespaceScope, int offset) { + if (namespaceScope != null) { + QualifiedName fullyQualifiedName = VariousUtils.getFullyQualifiedName(QualifiedName.create(attributeName), offset, namespaceScope); + if (attribute.getFqName().equals(fullyQualifiedName.toString())) { + return true; + } + } + return false; + } + public static Map>>> getParamTypesFromPHPDoc(Program root, ASTNode node) { Map>>> retval = new HashMap<>(); Comment comment = Utils.getCommentForNode(root, node); diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/CaseDeclarationInfo.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/CaseDeclarationInfo.java index b5a243876153..50df01b65b98 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/CaseDeclarationInfo.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/CaseDeclarationInfo.java @@ -77,6 +77,10 @@ public PhpModifiers getAccessModifiers() { return PhpModifiers.fromBitMask(caseDeclaration.getModifier()); } + public CaseDeclaration getCaseDeclaration() { + return caseDeclaration; + } + @CheckForNull protected static String getCaseValue(Expression expr) { if (expr instanceof Scalar) { diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/ClassConstantDeclarationInfo.java b/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/ClassConstantDeclarationInfo.java index 7ba370457b98..5b194f037288 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/ClassConstantDeclarationInfo.java +++ b/php/php.editor/src/org/netbeans/modules/php/editor/model/nodes/ClassConstantDeclarationInfo.java @@ -103,6 +103,10 @@ public PhpModifiers getAccessModifiers() { return PhpModifiers.fromBitMask(constantDeclaration.getModifier()); } + public ConstantDeclaration getConstantDeclaration() { + return constantDeclaration; + } + @CheckForNull protected static String getConstantValue(Expression expr) { if (expr instanceof Scalar) { diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/resources/layer.xml b/php/php.editor/src/org/netbeans/modules/php/editor/resources/layer.xml index 4096b8b76003..54978d485c2e 100644 --- a/php/php.editor/src/org/netbeans/modules/php/editor/resources/layer.xml +++ b/php/php.editor/src/org/netbeans/modules/php/editor/resources/layer.xml @@ -428,6 +428,7 @@ + diff --git a/php/php.editor/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintError.java b/php/php.editor/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintError.java new file mode 100644 index 000000000000..fe3fa38bdc07 --- /dev/null +++ b/php/php.editor/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintError.java @@ -0,0 +1,269 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.php.editor.verification; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.netbeans.modules.csl.api.Hint; +import org.netbeans.modules.csl.api.HintFix; +import org.netbeans.modules.csl.api.OffsetRange; +import org.netbeans.modules.csl.spi.support.CancelSupport; +import org.netbeans.modules.php.api.PhpVersion; +import org.netbeans.modules.php.editor.CodeUtils; +import static org.netbeans.modules.php.editor.PredefinedSymbols.Attributes.DEPRECATED; +import org.netbeans.modules.php.editor.model.FileScope; +import org.netbeans.modules.php.editor.model.impl.VariousUtils; +import org.netbeans.modules.php.editor.parser.PHPParseResult; +import org.netbeans.modules.php.editor.parser.astnodes.ASTNode; +import org.netbeans.modules.php.editor.parser.astnodes.Attribute; +import org.netbeans.modules.php.editor.parser.astnodes.AttributeDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.Attributed; +import org.netbeans.modules.php.editor.parser.astnodes.ClassDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.ClassInstanceCreation; +import org.netbeans.modules.php.editor.parser.astnodes.EnumDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.FieldsDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.InterfaceDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.TraitDeclaration; +import org.netbeans.modules.php.editor.parser.astnodes.visitors.DefaultVisitor; +import org.openide.filesystems.FileObject; +import org.openide.util.NbBundle; + +/** + * Attribute "Deprecated" (#[\Deprecated]) can target function, method, and + * class constant(enum case) in PHP 8.4. + * + * #[\Deprecated] cannot target type and field. The follwing cases are errors. + *
+ * #[\Deprecated] // error
+ * class DeprecatedClass {
+ *     #[\Deprecated] // error
+ *     public string $deprecatedField = "deprecated";
+ * }
+ * #[Deprecated] // error
+ * trait DeprecatedTrait {}
+ * 
+ * + * PHP Fatal error: Attribute "Deprecated" cannot target class (allowed targets: + * function, method, class constant) + */ +public class IncorrectDeprecatedAttributeHintError extends HintErrorRule { + + private FileObject fileObject; + + @NbBundle.Messages("IncorrectDeprecatedAttributeHintError.displayName=Incorrect Deprecated Attribute") + @Override + public String getDisplayName() { + return Bundle.IncorrectDeprecatedAttributeHintError_displayName(); + } + + @NbBundle.Messages({ + "# {0} - attribute name", + "# {1} - type", + "IncorrectDeprecatedAttributeHintError.incorrect.deprecated.attribute.desc=Attribute \"{0}\" cannot target {1}.", + "IncorrectDeprecatedAttributeHintError.type=type", + "IncorrectDeprecatedAttributeHintError.field=field", + }) + @Override + public void invoke(PHPRuleContext context, List hints) { + PHPParseResult phpParseResult = (PHPParseResult) context.parserResult; + if (phpParseResult.getProgram() == null) { + return; + } + FileScope fileScope = context.fileScope; + fileObject = phpParseResult.getSnapshot().getSource().getFileObject(); + if (fileScope != null && fileObject != null && appliesTo(getPhpVersion())) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + CheckVisitor checkVisitor = new CheckVisitor(fileScope); + phpParseResult.getProgram().accept(checkVisitor); + addIncorrectAttributeHint( + checkVisitor.getIncorrectTypeAttributes(), + Bundle.IncorrectDeprecatedAttributeHintError_incorrect_deprecated_attribute_desc( + DEPRECATED.getName(), + Bundle.IncorrectDeprecatedAttributeHintError_type() + ), + hints + ); + addIncorrectAttributeHint( + checkVisitor.getIncorrectFieldAttributes(), + Bundle.IncorrectDeprecatedAttributeHintError_incorrect_deprecated_attribute_desc( + DEPRECATED.getName(), + Bundle.IncorrectDeprecatedAttributeHintError_field() + ), + hints + ); + } + } + + protected PhpVersion getPhpVersion() { + return CodeUtils.getPhpVersion(fileObject); + } + + private boolean appliesTo(PhpVersion phpVersion) { + return phpVersion.compareTo(PhpVersion.PHP_84) >= 0; + } + + private void addIncorrectAttributeHint(List attributeDeclarations, String description, List hints) { + for (AttributeDeclaration attributeDeclaration : attributeDeclarations) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + addHint(attributeDeclaration, description, hints); + } + } + + private void addHint(ASTNode node, String description, List hints) { + addHint(node, description, hints, Collections.emptyList()); + } + + private void addHint(ASTNode node, String description, List hints, List fixes) { + hints.add(new Hint( + this, + description, + fileObject, + new OffsetRange(node.getStartOffset(), node.getEndOffset()), + fixes, + 500 + )); + } + + //~ Inner class + private static final class CheckVisitor extends DefaultVisitor { + + private final FileScope fileScope; + private final List incorrectTypeAttributes = new ArrayList<>(); + private final List incorrectFieldAttributes = new ArrayList<>(); + + public CheckVisitor(FileScope fileScope) { + this.fileScope = fileScope; + } + + public List getIncorrectTypeAttributes() { + return Collections.unmodifiableList(incorrectTypeAttributes); + } + + public List getIncorrectFieldAttributes() { + return Collections.unmodifiableList(incorrectFieldAttributes); + } + + @Override + public void visit(ClassDeclaration node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + @Override + public void visit(InterfaceDeclaration node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + @Override + public void visit(TraitDeclaration node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + @Override + public void visit(EnumDeclaration node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + @Override + public void visit(ClassInstanceCreation node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAnonymous() && node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + @Override + public void visit(FieldsDeclaration node) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + if (node.isAttributed()) { + checkAttributes(node); + } + super.visit(node); + } + + private void checkAttributes(ASTNode node) { + if (!(node instanceof Attributed)) { + return; + } + for (Attribute attribute : ((Attributed) node).getAttributes()) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + checkAttribute(attribute, node); + } + } + + private void checkAttribute(Attribute attribute, ASTNode node) { + for (AttributeDeclaration attributeDeclaration : attribute.getAttributeDeclarations()) { + if (CancelSupport.getDefault().isCancelled()) { + return; + } + String attributeName = CodeUtils.extractQualifiedName(attributeDeclaration.getAttributeName()); + if (!VariousUtils.isPredefinedAttributeName(DEPRECATED, attributeName, fileScope, attributeDeclaration.getStartOffset())) { + continue; + } + addIncorrectAttribute(node, attributeDeclaration); + break; + } + } + + private void addIncorrectAttribute(ASTNode node, AttributeDeclaration attributeDeclaration) { + if (CodeUtils.isTypeDeclaration(node)) { + incorrectTypeAttributes.add(attributeDeclaration); + } else if (node instanceof FieldsDeclaration) { + incorrectFieldAttributes.add(attributeDeclaration); + } else { + assert false : "TypeDeclaration or FieldsDeclaration is expected, but got " + node.getClass().getName(); // NOI18N + } + } + } +} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInGlobal.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInGlobal.pass new file mode 100644 index 000000000000..8b1f8ec1eab3 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInGlobal.pass @@ -0,0 +1,10 @@ +|-DeprecatedEnumCase [820, 1029] : ESCAPED{DeprecatedEnumCase} +|--Case1 [850, 855] : ESCAPED{Case1} +|--DeprecatedCase1 [884, 899] : DEPRECATED{ESCAPED{DeprecatedCase1}} +|--DeprecatedCase2 [960, 975] : DEPRECATED{ESCAPED{DeprecatedCase2}} +|--DeprecatedCase3 [1011, 1026] : DEPRECATED{ESCAPED{DeprecatedCase3}} +|-DeprecatedBackedEnumCase [1036, 1336] : ESCAPED{DeprecatedBackedEnumCase}(ESCAPED{string}) +|--Case1 [1080, 1085] : ESCAPED{Case1}ESCAPED{ }ESCAPED{"case 1"} +|--DeprecatedCase1 [1125, 1140] : DEPRECATED{ESCAPED{DeprecatedCase1}}ESCAPED{ }ESCAPED{"deprecated case 1"} +|--DeprecatedCase2 [1223, 1238] : DEPRECATED{ESCAPED{DeprecatedCase2}}ESCAPED{ }ESCAPED{"deprecated case 2"} +|--DeprecatedCase3 [1296, 1311] : DEPRECATED{ESCAPED{DeprecatedCase3}}ESCAPED{ }ESCAPED{"deprecated case 3"} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespace.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespace.pass new file mode 100644 index 000000000000..3bd6cbf05c44 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespace.pass @@ -0,0 +1,11 @@ +|-DeprecatedAttributeTest [824, 1371] : ESCAPED{DeprecatedAttributeTest} +|--DeprecatedEnumCase [855, 1064] : ESCAPED{DeprecatedEnumCase} +|---Case1 [885, 890] : ESCAPED{Case1} +|---DeprecatedCase1 [919, 934] : ESCAPED{DeprecatedCase1} +|---DeprecatedCase2 [995, 1010] : DEPRECATED{ESCAPED{DeprecatedCase2}} +|---DeprecatedCase3 [1046, 1061] : DEPRECATED{ESCAPED{DeprecatedCase3}} +|--DeprecatedBackedEnumCase [1071, 1371] : ESCAPED{DeprecatedBackedEnumCase}(ESCAPED{string}) +|---Case1 [1115, 1120] : ESCAPED{Case1}ESCAPED{ }ESCAPED{"case 1"} +|---DeprecatedCase1 [1160, 1175] : ESCAPED{DeprecatedCase1}ESCAPED{ }ESCAPED{"deprecated case 1"} +|---DeprecatedCase2 [1258, 1273] : DEPRECATED{ESCAPED{DeprecatedCase2}}ESCAPED{ }ESCAPED{"deprecated case 2"} +|---DeprecatedCase3 [1331, 1346] : DEPRECATED{ESCAPED{DeprecatedCase3}}ESCAPED{ }ESCAPED{"deprecated case 3"} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespaceWithUse.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespaceWithUse.pass new file mode 100644 index 000000000000..6530a5023a12 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeEnumCaseInNamespaceWithUse.pass @@ -0,0 +1,12 @@ +|-DeprecatedAttributeTest [824, 1388] : ESCAPED{DeprecatedAttributeTest} +|--Deprecated [854, 864] : ESCAPED{Deprecated} +|--DeprecatedEnumCase [872, 1081] : ESCAPED{DeprecatedEnumCase} +|---Case1 [902, 907] : ESCAPED{Case1} +|---DeprecatedCase1 [936, 951] : DEPRECATED{ESCAPED{DeprecatedCase1}} +|---DeprecatedCase2 [1012, 1027] : DEPRECATED{ESCAPED{DeprecatedCase2}} +|---DeprecatedCase3 [1063, 1078] : DEPRECATED{ESCAPED{DeprecatedCase3}} +|--DeprecatedBackedEnumCase [1088, 1388] : ESCAPED{DeprecatedBackedEnumCase}(ESCAPED{string}) +|---Case1 [1132, 1137] : ESCAPED{Case1}ESCAPED{ }ESCAPED{"case 1"} +|---DeprecatedCase1 [1177, 1192] : DEPRECATED{ESCAPED{DeprecatedCase1}}ESCAPED{ }ESCAPED{"deprecated case 1"} +|---DeprecatedCase2 [1275, 1290] : DEPRECATED{ESCAPED{DeprecatedCase2}}ESCAPED{ }ESCAPED{"deprecated case 2"} +|---DeprecatedCase3 [1348, 1363] : DEPRECATED{ESCAPED{DeprecatedCase3}}ESCAPED{ }ESCAPED{"deprecated case 3"} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInGlobal.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInGlobal.pass new file mode 100644 index 000000000000..3c7498cfe1ac --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInGlobal.pass @@ -0,0 +1,16 @@ +|-deprecated01 [202, 226] : DEPRECATED{ESCAPED{deprecated01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecated02 [269, 293] : DEPRECATED{ESCAPED{deprecated02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecated03 [345, 369] : DEPRECATED{ESCAPED{deprecated03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecated04 [398, 422] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedWithPhpDoc01 [496, 530] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedWithPhpDoc02 [604, 638] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedWithParam01 [701, 734] : DEPRECATED{ESCAPED{deprecatedWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedWithParam02 [813, 846] : DEPRECATED{ESCAPED{deprecatedWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQN [872, 897] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQN02 [943, 970] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQN03 [1026, 1053] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQN04 [1084, 1111] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQNWithPhpDoc01 [1186, 1223] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQNWithPhpDoc02 [1292, 1329] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQNWithParam01 [1393, 1429] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-deprecatedFQNWithParam02 [1509, 1545] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace01.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace01.pass new file mode 100644 index 000000000000..e411fa0d9813 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace01.pass @@ -0,0 +1,19 @@ +|-DeprecatedTest1 [169, 1545] : ESCAPED{DeprecatedTest1} +|--deprecated [210, 232] : ESCAPED{deprecated}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [275, 299] : ESCAPED{deprecated02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [351, 375] : ESCAPED{deprecated03}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [404, 428] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [502, 536] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [604, 638] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [701, 734] : ESCAPED{deprecatedWithParam01}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [813, 846] : ESCAPED{deprecatedWithParam02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [872, 897] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [943, 970] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1026, 1053] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1084, 1111] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1186, 1223] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1292, 1329] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1393, 1429] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1509, 1545] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [1557, 1599] : ESCAPED{DeprecatedTest2} +|--test [1584, 1599] : ESCAPED{test}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace02.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace02.pass new file mode 100644 index 000000000000..7a9a0a34dccd --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace02.pass @@ -0,0 +1,19 @@ +|-DeprecatedTest1 [169, 211] : ESCAPED{DeprecatedTest1} +|--test [196, 211] : ESCAPED{test}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [223, 1599] : ESCAPED{DeprecatedTest2} +|--deprecated [264, 286] : ESCAPED{deprecated}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [329, 353] : ESCAPED{deprecated02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [405, 429] : ESCAPED{deprecated03}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [458, 482] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [556, 590] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [658, 692] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [755, 788] : ESCAPED{deprecatedWithParam01}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [867, 900] : ESCAPED{deprecatedWithParam02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [926, 951] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [997, 1024] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1080, 1107] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1138, 1165] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1240, 1277] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1346, 1383] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1447, 1483] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1563, 1599] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace03.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace03.pass new file mode 100644 index 000000000000..19c1997cc955 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespace03.pass @@ -0,0 +1,34 @@ +|-DeprecatedTest1 [169, 1551] : ESCAPED{DeprecatedTest1} +|--deprecated [210, 232] : ESCAPED{deprecated}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [275, 299] : ESCAPED{deprecated02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [351, 375] : ESCAPED{deprecated03}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [404, 428] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [502, 536] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [610, 644] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [707, 740] : ESCAPED{deprecatedWithParam01}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [819, 852] : ESCAPED{deprecatedWithParam02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [878, 903] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [949, 976] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1032, 1059] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1090, 1117] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1192, 1229] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1298, 1335] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1399, 1435] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1515, 1551] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [1563, 2939] : ESCAPED{DeprecatedTest2} +|--deprecated [1604, 1626] : ESCAPED{deprecated}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [1669, 1693] : ESCAPED{deprecated02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [1745, 1769] : ESCAPED{deprecated03}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [1798, 1822] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [1896, 1930] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [1998, 2032] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [2095, 2128] : ESCAPED{deprecatedWithParam01}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [2207, 2240] : ESCAPED{deprecatedWithParam02}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [2266, 2291] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [2337, 2364] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [2420, 2447] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [2478, 2505] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [2580, 2617] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [2686, 2723] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [2787, 2823] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [2903, 2939] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse01.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse01.pass new file mode 100644 index 000000000000..0bc83fe9ca60 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse01.pass @@ -0,0 +1,20 @@ +|-DeprecatedTest1 [169, 1562] : ESCAPED{DeprecatedTest1} +|--Deprecated [191, 201] : ESCAPED{Deprecated} +|--deprecated [227, 249] : DEPRECATED{ESCAPED{deprecated}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [292, 316] : DEPRECATED{ESCAPED{deprecated02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [368, 392] : DEPRECATED{ESCAPED{deprecated03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [421, 445] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [519, 553] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [621, 655] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [718, 751] : DEPRECATED{ESCAPED{deprecatedWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [830, 863] : DEPRECATED{ESCAPED{deprecatedWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [889, 914] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [960, 987] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1043, 1070] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1101, 1128] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1203, 1240] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1309, 1346] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1410, 1446] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1526, 1562] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [1574, 1616] : ESCAPED{DeprecatedTest2} +|--test [1601, 1616] : ESCAPED{test}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse02.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse02.pass new file mode 100644 index 000000000000..866cf14c1428 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse02.pass @@ -0,0 +1,20 @@ +|-DeprecatedTest1 [169, 211] : ESCAPED{DeprecatedTest1} +|--test [196, 211] : ESCAPED{test}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [223, 1616] : ESCAPED{DeprecatedTest2} +|--Deprecated [245, 255] : ESCAPED{Deprecated} +|--deprecated [281, 303] : DEPRECATED{ESCAPED{deprecated}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [346, 370] : DEPRECATED{ESCAPED{deprecated02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [422, 446] : DEPRECATED{ESCAPED{deprecated03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [475, 499] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [573, 607] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [675, 709] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [772, 805] : DEPRECATED{ESCAPED{deprecatedWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [884, 917] : DEPRECATED{ESCAPED{deprecatedWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [943, 968] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [1014, 1041] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1097, 1124] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1155, 1182] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1257, 1294] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1363, 1400] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1464, 1500] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1580, 1616] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse03.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse03.pass new file mode 100644 index 000000000000..8d5b27b2946d --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse03.pass @@ -0,0 +1,33 @@ +|-DeprecatedTest1 [169, 1562] : ESCAPED{DeprecatedTest1} +|--Deprecated [191, 201] : ESCAPED{Deprecated} +|--deprecated [227, 249] : DEPRECATED{ESCAPED{deprecated}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated02 [292, 316] : DEPRECATED{ESCAPED{deprecated02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated03 [368, 392] : DEPRECATED{ESCAPED{deprecated03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecated04 [421, 445] : ESCAPED{deprecated04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [519, 553] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [621, 655] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [718, 751] : DEPRECATED{ESCAPED{deprecatedWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [830, 863] : DEPRECATED{ESCAPED{deprecatedWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [889, 914] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [960, 987] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [1043, 1070] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [1101, 1128] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [1203, 1240] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [1309, 1346] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [1410, 1446] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [1526, 1562] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTest2 [1574, 2771] : ESCAPED{DeprecatedTest2} +|--Deprecated [1596, 1606] : ESCAPED{Deprecated} +|--deprecated [1632, 1654] : DEPRECATED{ESCAPED{deprecated}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc01 [1728, 1762] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithPhpDoc02 [1830, 1864] : DEPRECATED{ESCAPED{deprecatedWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam01 [1927, 1960] : DEPRECATED{ESCAPED{deprecatedWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedWithParam02 [2039, 2072] : DEPRECATED{ESCAPED{deprecatedWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN [2098, 2123] : DEPRECATED{ESCAPED{deprecatedFQN}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN02 [2169, 2196] : DEPRECATED{ESCAPED{deprecatedFQN02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN03 [2252, 2279] : DEPRECATED{ESCAPED{deprecatedFQN03}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQN04 [2310, 2337] : ESCAPED{deprecatedFQN04}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc01 [2412, 2449] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithPhpDoc02 [2518, 2555] : DEPRECATED{ESCAPED{deprecatedFQNWithPhpDoc02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam01 [2619, 2655] : DEPRECATED{ESCAPED{deprecatedFQNWithParam01}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--deprecatedFQNWithParam02 [2735, 2771] : DEPRECATED{ESCAPED{deprecatedFQNWithParam02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInGlobal.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInGlobal.pass new file mode 100644 index 000000000000..a651d4554350 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInGlobal.pass @@ -0,0 +1,83 @@ +|-DeprecatedClassMethod [821, 2151] : ESCAPED{DeprecatedClassMethod} +|--publicMethod [877, 899] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateMethod [921, 944] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedMethod [968, 993] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicStaticMethod [1021, 1049] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateStaticMethod [1078, 1107] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedStaticMethod [1138, 1169] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod [1208, 1240] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedMethod [1280, 1313] : DEPRECATED{ESCAPED{privateDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedMethod [1355, 1390] : DEPRECATED{ESCAPED{protectedDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod [1436, 1474] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticMethod [1521, 1560] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticMethod [1609, 1650] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod02 [1690, 1724] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedMethod02 [1765, 1800] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedMethod02 [1843, 1880] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod02 [1927, 1967] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticMethod02 [2015, 2056] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticMethod02 [2106, 2149] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedInterfaceMethod [2163, 2608] : ESCAPED{DeprecatedInterfaceMethod} +|--publicMethod [2211, 2231] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicStaticMethod [2272, 2298] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod [2337, 2367] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod [2413, 2449] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod02 [2489, 2521] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod02 [2568, 2606] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedTraitMethod [2616, 4158] : ESCAPED{DeprecatedTraitMethod} +|--publicTraitMethod [2660, 2687] : ESCAPED{publicTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateTraitMethod [2709, 2737] : ESCAPED{privateTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedTraitMethod [2761, 2791] : ESCAPED{protectedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicStaticTraitMethod [2819, 2852] : ESCAPED{publicStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateStaticTraitMethod [2881, 2915] : ESCAPED{privateStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedStaticTraitMethod [2946, 2982] : ESCAPED{protectedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedTraitMethod [3021, 3058] : DEPRECATED{ESCAPED{publicDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedTraitMethod [3098, 3136] : DEPRECATED{ESCAPED{privateDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedTraitMethod [3178, 3218] : DEPRECATED{ESCAPED{protectedDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticTraitMethod [3284, 3327] : DEPRECATED{ESCAPED{publicDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticTraitMethod [3374, 3418] : DEPRECATED{ESCAPED{privateDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticTraitMethod [3467, 3513] : DEPRECATED{ESCAPED{protectedDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedTraitMethod02 [3618, 3657] : DEPRECATED{ESCAPED{publicDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedTraitMethod02 [3698, 3738] : DEPRECATED{ESCAPED{privateDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedTraitMethod02 [3817, 3859] : DEPRECATED{ESCAPED{protectedDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticTraitMethod02 [3906, 3951] : DEPRECATED{ESCAPED{publicDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticTraitMethod02 [3999, 4045] : DEPRECATED{ESCAPED{privateDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticTraitMethod02 [4108, 4156] : DEPRECATED{ESCAPED{protectedDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-DeprecatedEnumMethod [4165, 5574] : ESCAPED{DeprecatedEnumMethod} +|--publicEnumMethod [4208, 4234] : ESCAPED{publicEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateEnumMethod [4256, 4283] : ESCAPED{privateEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedEnumMethod [4307, 4336] : ESCAPED{protectedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicStaticEnumMethod [4364, 4396] : ESCAPED{publicStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateStaticEnumMethod [4425, 4458] : ESCAPED{privateStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedStaticEnumMethod [4489, 4524] : ESCAPED{protectedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedEnumMethod [4570, 4606] : DEPRECATED{ESCAPED{publicDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedEnumMethod [4659, 4696] : DEPRECATED{ESCAPED{privateDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedEnumMethod [4738, 4777] : DEPRECATED{ESCAPED{protectedDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticEnumMethod [4823, 4865] : DEPRECATED{ESCAPED{publicDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticEnumMethod [4912, 4955] : DEPRECATED{ESCAPED{privateDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticEnumMethod [5004, 5049] : DEPRECATED{ESCAPED{protectedDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedEnumMethod02 [5089, 5127] : DEPRECATED{ESCAPED{publicDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedEnumMethod02 [5168, 5207] : DEPRECATED{ESCAPED{privateDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedEnumMethod02 [5250, 5291] : DEPRECATED{ESCAPED{protectedDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticEnumMethod02 [5338, 5382] : DEPRECATED{ESCAPED{publicDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticEnumMethod02 [5430, 5475] : DEPRECATED{ESCAPED{privateDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticEnumMethod02 [5525, 5572] : DEPRECATED{ESCAPED{protectedDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|-#anon#deprecatedAttributeMethodsInGlobal_php#1 [5588, 6904] : ESCAPED{{}} +|--publicMethod [5630, 5652] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateMethod [5674, 5697] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedMethod [5721, 5746] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicStaticMethod [5774, 5802] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateStaticMethod [5831, 5860] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedStaticMethod [5891, 5922] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod [5961, 5993] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedMethod [6033, 6066] : DEPRECATED{ESCAPED{privateDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedMethod [6108, 6143] : DEPRECATED{ESCAPED{protectedDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod [6189, 6227] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticMethod [6274, 6313] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticMethod [6362, 6403] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedMethod02 [6443, 6477] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedMethod02 [6518, 6553] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedMethod02 [6596, 6633] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--publicDeprecatedStaticMethod02 [6680, 6720] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--privateDeprecatedStaticMethod02 [6768, 6809] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--protectedDeprecatedStaticMethod02 [6859, 6902] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespace.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespace.pass new file mode 100644 index 000000000000..1fb93d8693a6 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespace.pass @@ -0,0 +1,84 @@ +|-DeprecatedMethods [825, 6935] : ESCAPED{DeprecatedMethods} +|--DeprecatedClassMethod [851, 2181] : ESCAPED{DeprecatedClassMethod} +|---publicMethod [907, 929] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateMethod [951, 974] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedMethod [998, 1023] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [1051, 1079] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticMethod [1108, 1137] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticMethod [1168, 1199] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [1238, 1270] : ESCAPED{publicDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod [1310, 1343] : ESCAPED{privateDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod [1385, 1420] : ESCAPED{protectedDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [1466, 1504] : ESCAPED{publicDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod [1551, 1590] : ESCAPED{privateDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod [1639, 1680] : ESCAPED{protectedDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [1720, 1754] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod02 [1795, 1830] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod02 [1873, 1910] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [1957, 1997] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod02 [2045, 2086] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod02 [2136, 2179] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedInterfaceMethod [2193, 2638] : ESCAPED{DeprecatedInterfaceMethod} +|---publicMethod [2241, 2261] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [2302, 2328] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [2367, 2397] : ESCAPED{publicDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [2443, 2479] : ESCAPED{publicDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [2519, 2551] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [2598, 2636] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedTraitMethod [2646, 4188] : ESCAPED{DeprecatedTraitMethod} +|---publicTraitMethod [2690, 2717] : ESCAPED{publicTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateTraitMethod [2739, 2767] : ESCAPED{privateTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedTraitMethod [2791, 2821] : ESCAPED{protectedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticTraitMethod [2849, 2882] : ESCAPED{publicStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticTraitMethod [2911, 2945] : ESCAPED{privateStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticTraitMethod [2976, 3012] : ESCAPED{protectedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedTraitMethod [3051, 3088] : ESCAPED{publicDeprecatedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedTraitMethod [3128, 3166] : ESCAPED{privateDeprecatedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedTraitMethod [3208, 3248] : ESCAPED{protectedDeprecatedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticTraitMethod [3314, 3357] : ESCAPED{publicDeprecatedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticTraitMethod [3404, 3448] : ESCAPED{privateDeprecatedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticTraitMethod [3497, 3543] : ESCAPED{protectedDeprecatedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedTraitMethod02 [3648, 3687] : DEPRECATED{ESCAPED{publicDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedTraitMethod02 [3728, 3768] : DEPRECATED{ESCAPED{privateDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedTraitMethod02 [3847, 3889] : DEPRECATED{ESCAPED{protectedDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticTraitMethod02 [3936, 3981] : DEPRECATED{ESCAPED{publicDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticTraitMethod02 [4029, 4075] : DEPRECATED{ESCAPED{privateDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticTraitMethod02 [4138, 4186] : DEPRECATED{ESCAPED{protectedDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedEnumMethod [4195, 5604] : ESCAPED{DeprecatedEnumMethod} +|---publicEnumMethod [4238, 4264] : ESCAPED{publicEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateEnumMethod [4286, 4313] : ESCAPED{privateEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedEnumMethod [4337, 4366] : ESCAPED{protectedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticEnumMethod [4394, 4426] : ESCAPED{publicStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticEnumMethod [4455, 4488] : ESCAPED{privateStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticEnumMethod [4519, 4554] : ESCAPED{protectedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedEnumMethod [4600, 4636] : ESCAPED{publicDeprecatedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedEnumMethod [4689, 4726] : ESCAPED{privateDeprecatedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedEnumMethod [4768, 4807] : ESCAPED{protectedDeprecatedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticEnumMethod [4853, 4895] : ESCAPED{publicDeprecatedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticEnumMethod [4942, 4985] : ESCAPED{privateDeprecatedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticEnumMethod [5034, 5079] : ESCAPED{protectedDeprecatedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedEnumMethod02 [5119, 5157] : DEPRECATED{ESCAPED{publicDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedEnumMethod02 [5198, 5237] : DEPRECATED{ESCAPED{privateDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedEnumMethod02 [5280, 5321] : DEPRECATED{ESCAPED{protectedDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticEnumMethod02 [5368, 5412] : DEPRECATED{ESCAPED{publicDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticEnumMethod02 [5460, 5505] : DEPRECATED{ESCAPED{privateDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticEnumMethod02 [5555, 5602] : DEPRECATED{ESCAPED{protectedDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--#anon#deprecatedAttributeMethodsInNamespace_php#1 [5618, 6934] : ESCAPED{{}} +|---publicMethod [5660, 5682] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateMethod [5704, 5727] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedMethod [5751, 5776] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [5804, 5832] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticMethod [5861, 5890] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticMethod [5921, 5952] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [5991, 6023] : ESCAPED{publicDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod [6063, 6096] : ESCAPED{privateDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod [6138, 6173] : ESCAPED{protectedDeprecatedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [6219, 6257] : ESCAPED{publicDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod [6304, 6343] : ESCAPED{privateDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod [6392, 6433] : ESCAPED{protectedDeprecatedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [6473, 6507] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod02 [6548, 6583] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod02 [6626, 6663] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [6710, 6750] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod02 [6798, 6839] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod02 [6889, 6932] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespaceWithUse.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespaceWithUse.pass new file mode 100644 index 000000000000..31ef167b3116 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeMethodsInNamespaceWithUse.pass @@ -0,0 +1,85 @@ +|-DeprecatedMethods [825, 6952] : ESCAPED{DeprecatedMethods} +|--Deprecated [849, 859] : ESCAPED{Deprecated} +|--DeprecatedClassMethod [868, 2198] : ESCAPED{DeprecatedClassMethod} +|---publicMethod [924, 946] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateMethod [968, 991] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedMethod [1015, 1040] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [1068, 1096] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticMethod [1125, 1154] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticMethod [1185, 1216] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [1255, 1287] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod [1327, 1360] : DEPRECATED{ESCAPED{privateDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod [1402, 1437] : DEPRECATED{ESCAPED{protectedDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [1483, 1521] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod [1568, 1607] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod [1656, 1697] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [1737, 1771] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod02 [1812, 1847] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod02 [1890, 1927] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [1974, 2014] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod02 [2062, 2103] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod02 [2153, 2196] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedInterfaceMethod [2210, 2655] : ESCAPED{DeprecatedInterfaceMethod} +|---publicMethod [2258, 2278] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [2319, 2345] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [2384, 2414] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [2460, 2496] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [2536, 2568] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [2615, 2653] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedTraitMethod [2663, 4205] : ESCAPED{DeprecatedTraitMethod} +|---publicTraitMethod [2707, 2734] : ESCAPED{publicTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateTraitMethod [2756, 2784] : ESCAPED{privateTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedTraitMethod [2808, 2838] : ESCAPED{protectedTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticTraitMethod [2866, 2899] : ESCAPED{publicStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticTraitMethod [2928, 2962] : ESCAPED{privateStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticTraitMethod [2993, 3029] : ESCAPED{protectedStaticTraitMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedTraitMethod [3068, 3105] : DEPRECATED{ESCAPED{publicDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedTraitMethod [3145, 3183] : DEPRECATED{ESCAPED{privateDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedTraitMethod [3225, 3265] : DEPRECATED{ESCAPED{protectedDeprecatedTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticTraitMethod [3331, 3374] : DEPRECATED{ESCAPED{publicDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticTraitMethod [3421, 3465] : DEPRECATED{ESCAPED{privateDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticTraitMethod [3514, 3560] : DEPRECATED{ESCAPED{protectedDeprecatedStaticTraitMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedTraitMethod02 [3665, 3704] : DEPRECATED{ESCAPED{publicDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedTraitMethod02 [3745, 3785] : DEPRECATED{ESCAPED{privateDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedTraitMethod02 [3864, 3906] : DEPRECATED{ESCAPED{protectedDeprecatedTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticTraitMethod02 [3953, 3998] : DEPRECATED{ESCAPED{publicDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticTraitMethod02 [4046, 4092] : DEPRECATED{ESCAPED{privateDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticTraitMethod02 [4155, 4203] : DEPRECATED{ESCAPED{protectedDeprecatedStaticTraitMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--DeprecatedEnumMethod [4212, 5621] : ESCAPED{DeprecatedEnumMethod} +|---publicEnumMethod [4255, 4281] : ESCAPED{publicEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateEnumMethod [4303, 4330] : ESCAPED{privateEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedEnumMethod [4354, 4383] : ESCAPED{protectedEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticEnumMethod [4411, 4443] : ESCAPED{publicStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticEnumMethod [4472, 4505] : ESCAPED{privateStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticEnumMethod [4536, 4571] : ESCAPED{protectedStaticEnumMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedEnumMethod [4617, 4653] : DEPRECATED{ESCAPED{publicDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedEnumMethod [4706, 4743] : DEPRECATED{ESCAPED{privateDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedEnumMethod [4785, 4824] : DEPRECATED{ESCAPED{protectedDeprecatedEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticEnumMethod [4870, 4912] : DEPRECATED{ESCAPED{publicDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticEnumMethod [4959, 5002] : DEPRECATED{ESCAPED{privateDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticEnumMethod [5051, 5096] : DEPRECATED{ESCAPED{protectedDeprecatedStaticEnumMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedEnumMethod02 [5136, 5174] : DEPRECATED{ESCAPED{publicDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedEnumMethod02 [5215, 5254] : DEPRECATED{ESCAPED{privateDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedEnumMethod02 [5297, 5338] : DEPRECATED{ESCAPED{protectedDeprecatedEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticEnumMethod02 [5385, 5429] : DEPRECATED{ESCAPED{publicDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticEnumMethod02 [5477, 5522] : DEPRECATED{ESCAPED{privateDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticEnumMethod02 [5572, 5619] : DEPRECATED{ESCAPED{protectedDeprecatedStaticEnumMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|--#anon#deprecatedAttributeMethodsInNamespaceWithUse_php#1 [5635, 6951] : ESCAPED{{}} +|---publicMethod [5677, 5699] : ESCAPED{publicMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateMethod [5721, 5744] : ESCAPED{privateMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedMethod [5768, 5793] : ESCAPED{protectedMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicStaticMethod [5821, 5849] : ESCAPED{publicStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateStaticMethod [5878, 5907] : ESCAPED{privateStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedStaticMethod [5938, 5969] : ESCAPED{protectedStaticMethod}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod [6008, 6040] : DEPRECATED{ESCAPED{publicDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod [6080, 6113] : DEPRECATED{ESCAPED{privateDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod [6155, 6190] : DEPRECATED{ESCAPED{protectedDeprecatedMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod [6236, 6274] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod [6321, 6360] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod [6409, 6450] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedMethod02 [6490, 6524] : DEPRECATED{ESCAPED{publicDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedMethod02 [6565, 6600] : DEPRECATED{ESCAPED{privateDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedMethod02 [6643, 6680] : DEPRECATED{ESCAPED{protectedDeprecatedMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---publicDeprecatedStaticMethod02 [6727, 6767] : DEPRECATED{ESCAPED{publicDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---privateDeprecatedStaticMethod02 [6815, 6856] : DEPRECATED{ESCAPED{privateDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} +|---protectedDeprecatedStaticMethod02 [6906, 6949] : DEPRECATED{ESCAPED{protectedDeprecatedStaticMethod02}}ESCAPED{(}ESCAPED{)}:ESCAPED{void} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInGlobal.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInGlobal.pass new file mode 100644 index 000000000000..c50afe62d7c6 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInGlobal.pass @@ -0,0 +1,48 @@ +|-DeprecatedClassConstant [821, 1790] : ESCAPED{DeprecatedClassConstant} +|--PUBLIC_CONSTANT [883, 898] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_CONSTANT [945, 961] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_CONSTANT [1011, 1029] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT [1096, 1122] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT [1199, 1226] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT [1294, 1323] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT2 [1391, 1418] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT3 [1483, 1510] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT4 [1532, 1559] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT2 [1637, 1665] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT2 [1734, 1764] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|-DeprecatedInterfaceConstant [1802, 2076] : ESCAPED{DeprecatedInterfaceConstant} +|--PUBLIC_CONSTANT [1856, 1871] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT [1935, 1961] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT2 [2026, 2053] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|-DeprecatedTraitConstant [2084, 3053] : ESCAPED{DeprecatedTraitConstant} +|--PUBLIC_CONSTANT [2146, 2161] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_CONSTANT [2208, 2224] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_CONSTANT [2274, 2292] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT [2359, 2385] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT [2462, 2489] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT [2557, 2586] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT2 [2654, 2681] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT3 [2746, 2773] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PUBLIC_DEPRECATED_CONSTANT4 [2795, 2822] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT2 [2900, 2928] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT2 [2997, 3027] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|-DeprecatedEnumConstant [3060, 3859] : ESCAPED{DeprecatedEnumConstant} +|--PUBLIC_CONSTANT [3109, 3124] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_CONSTANT [3171, 3187] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_CONSTANT [3237, 3255] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT [3322, 3348] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT [3421, 3448] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT [3516, 3545] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT2 [3613, 3640] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT2 [3706, 3734] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT2 [3803, 3833] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|-#anon#deprecatedAttributeTypeConstantInGlobal_php#1 [3873, 4699] : ESCAPED{{}} +|--PUBLIC_CONSTANT [3907, 3922] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_CONSTANT [3969, 3985] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_CONSTANT [4035, 4053] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT [4120, 4146] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT [4211, 4238] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT [4306, 4335] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--PUBLIC_DEPRECATED_CONSTANT2 [4403, 4430] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--PRIVATE_DEPRECATED_CONSTANT2 [4504, 4532] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|--PROTECTED_DEPRECATED_CONSTANT2 [4643, 4673] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespace.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespace.pass new file mode 100644 index 000000000000..1ea3da71b51f --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespace.pass @@ -0,0 +1,49 @@ +|-DeprecatedAttributeTest [824, 4735] : ESCAPED{DeprecatedAttributeTest} +|--DeprecatedClassConstant [856, 1825] : ESCAPED{DeprecatedClassConstant} +|---PUBLIC_CONSTANT [918, 933] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [980, 996] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [1046, 1064] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [1131, 1157] : ESCAPED{PUBLIC_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [1234, 1261] : ESCAPED{PRIVATE_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [1329, 1358] : ESCAPED{PROTECTED_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [1426, 1453] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT3 [1518, 1545] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT4 [1567, 1594] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [1672, 1700] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [1769, 1799] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--DeprecatedInterfaceConstant [1837, 2111] : ESCAPED{DeprecatedInterfaceConstant} +|---PUBLIC_CONSTANT [1891, 1906] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT [1970, 1996] : ESCAPED{PUBLIC_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [2061, 2088] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--DeprecatedTraitConstant [2119, 3088] : ESCAPED{DeprecatedTraitConstant} +|---PUBLIC_CONSTANT [2181, 2196] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [2243, 2259] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [2309, 2327] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [2394, 2420] : ESCAPED{PUBLIC_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [2497, 2524] : ESCAPED{PRIVATE_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [2592, 2621] : ESCAPED{PROTECTED_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [2689, 2716] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT3 [2781, 2808] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT4 [2830, 2857] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [2935, 2963] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [3032, 3062] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--DeprecatedEnumConstant [3095, 3894] : ESCAPED{DeprecatedEnumConstant} +|---PUBLIC_CONSTANT [3144, 3159] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [3206, 3222] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [3272, 3290] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [3357, 3383] : ESCAPED{PUBLIC_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [3456, 3483] : ESCAPED{PRIVATE_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [3551, 3580] : ESCAPED{PROTECTED_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [3648, 3675] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [3741, 3769] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [3838, 3868] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--#anon#deprecatedAttributeTypeConstantInNamespace_php#1 [3908, 4734] : ESCAPED{{}} +|---PUBLIC_CONSTANT [3942, 3957] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [4004, 4020] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [4070, 4088] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [4155, 4181] : ESCAPED{PUBLIC_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [4246, 4273] : ESCAPED{PRIVATE_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [4341, 4370] : ESCAPED{PROTECTED_DEPRECATED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [4438, 4465] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [4539, 4567] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [4678, 4708] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} diff --git a/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespaceWithUse.pass b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespaceWithUse.pass new file mode 100644 index 000000000000..96439a492492 --- /dev/null +++ b/php/php.editor/test/unit/data/goldenfiles/org/netbeans/modules/php/editor/csl/NavigatorTest/structure/php84/deprecatedAttributeTypeConstantInNamespaceWithUse.pass @@ -0,0 +1,50 @@ +|-DeprecatedAttributeTest [824, 4752] : ESCAPED{DeprecatedAttributeTest} +|--Deprecated [854, 864] : ESCAPED{Deprecated} +|--DeprecatedClassConstant [873, 1842] : ESCAPED{DeprecatedClassConstant} +|---PUBLIC_CONSTANT [935, 950] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [997, 1013] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [1063, 1081] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [1148, 1174] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [1251, 1278] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [1346, 1375] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [1443, 1470] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT3 [1535, 1562] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT4 [1584, 1611] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [1689, 1717] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [1786, 1816] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--DeprecatedInterfaceConstant [1854, 2128] : ESCAPED{DeprecatedInterfaceConstant} +|---PUBLIC_CONSTANT [1908, 1923] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT [1987, 2013] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [2078, 2105] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|--DeprecatedTraitConstant [2136, 3105] : ESCAPED{DeprecatedTraitConstant} +|---PUBLIC_CONSTANT [2198, 2213] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [2260, 2276] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [2326, 2344] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [2411, 2437] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [2514, 2541] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [2609, 2638] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [2706, 2733] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT3 [2798, 2825] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT3}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PUBLIC_DEPRECATED_CONSTANT4 [2847, 2874] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT4}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [2952, 2980] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [3049, 3079] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--DeprecatedEnumConstant [3112, 3911] : ESCAPED{DeprecatedEnumConstant} +|---PUBLIC_CONSTANT [3161, 3176] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [3223, 3239] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [3289, 3307] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [3374, 3400] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [3473, 3500] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [3568, 3597] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [3665, 3692] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [3758, 3786] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [3855, 3885] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|--#anon#deprecatedAttributeTypeConstantInNamespaceWithUse_php#1 [3925, 4751] : ESCAPED{{}} +|---PUBLIC_CONSTANT [3959, 3974] : ESCAPED{PUBLIC_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_CONSTANT [4021, 4037] : ESCAPED{PRIVATE_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_CONSTANT [4087, 4105] : ESCAPED{PROTECTED_CONSTANT}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT [4172, 4198] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT [4263, 4290] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT [4358, 4387] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} +|---PUBLIC_DEPRECATED_CONSTANT2 [4455, 4482] : DEPRECATED{ESCAPED{PUBLIC_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"public constant"} +|---PRIVATE_DEPRECATED_CONSTANT2 [4556, 4584] : DEPRECATED{ESCAPED{PRIVATE_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"private constant"} +|---PROTECTED_DEPRECATED_CONSTANT2 [4695, 4725] : DEPRECATED{ESCAPED{PROTECTED_DEPRECATED_CONSTANT2}}:ESCAPED{string}ESCAPED{ }ESCAPED{"protected constant"} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInGlobal.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInGlobal.php new file mode 100644 index 000000000000..1770ec55c414 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInGlobal.php @@ -0,0 +1,109 @@ +CLASS:DeprecatedClassConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +interface |>CLASS:DeprecatedInterfaceConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; +} + +trait |>CLASS:DeprecatedTraitConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>DEPRECATED,FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +enum |>CLASS:DeprecatedEnumConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated, Attr()] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +$anon = new class() { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Attri, \Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated(|>CUSTOM2:since: <|"1.5", |>CUSTOM2:message: <|"deprecated test")] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +}; diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespace.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespace.php new file mode 100644 index 000000000000..e5953435f172 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespace.php @@ -0,0 +1,110 @@ +CLASS:DeprecatedClassConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +interface |>CLASS:DeprecatedInterfaceConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + #[Deprecated] + public const string |>FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; +} + +trait |>CLASS:DeprecatedTraitConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +enum |>CLASS:DeprecatedEnumConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated, Attr()] + private const string |>FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +$anon = new class() { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + private const string |>FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Attri, \Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated(|>CUSTOM2:since: <|"1.5", |>CUSTOM2:message: <|"deprecated test")] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +}; diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespaceWithUse.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespaceWithUse.php new file mode 100644 index 000000000000..b9e01479271d --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedConst/deprecatedAttributeInNamespaceWithUse.php @@ -0,0 +1,112 @@ +CLASS:DeprecatedClassConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +interface |>CLASS:DeprecatedInterfaceConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; +} + +trait |>CLASS:DeprecatedTraitConstant<| { + #[Attr] + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + #[Attr] + private const string |>DEPRECATED,FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT3<| = "public constant", |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT4<| = "public constant"; + #[Attr] + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +enum |>CLASS:DeprecatedEnumConstant<| { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated, Attr()] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +} + +$anon = new class() { + public const string |>FIELD,STATIC:PUBLIC_CONSTANT<| = "public constant"; + private const string |>FIELD,STATIC,UNUSED:PRIVATE_CONSTANT<| = "private constant"; + protected const string |>FIELD,STATIC:PROTECTED_CONSTANT<| = "protected constant"; + #[Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT<| = "public constant"; + #[Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT<| = "private constant"; + #[Deprecated] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT<| = "protected constant"; + #[\Deprecated] + public const string |>DEPRECATED,FIELD,STATIC:PUBLIC_DEPRECATED_CONSTANT2<| = "public constant"; + #[\Attri, \Deprecated] + private const string |>DEPRECATED,FIELD,STATIC,UNUSED:PRIVATE_DEPRECATED_CONSTANT2<| = "private constant"; + #[\Deprecated(|>CUSTOM2:since: <|"1.5", |>CUSTOM2:message: <|"deprecated test")] + protected const string |>DEPRECATED,FIELD,STATIC:PROTECTED_DEPRECATED_CONSTANT2<| = "protected constant"; +}; diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInGlobal.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInGlobal.php new file mode 100644 index 000000000000..dace9758a185 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInGlobal.php @@ -0,0 +1,39 @@ +CLASS:DeprecatedEnumCase<| { + case |>FIELD,STATIC:Case1<|; + #[Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase1<|; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<|; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<|; +} + +enum |>CLASS:DeprecatedBackedEnumCase<|: string { + case |>FIELD,STATIC:Case1<| = "case 1"; + #[Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase1<| = "deprecated case 1"; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<| = "deprecated case 2"; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<| = "deprecated case 3"; +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespace.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespace.php new file mode 100644 index 000000000000..a273613d5a61 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespace.php @@ -0,0 +1,40 @@ +CLASS:DeprecatedEnumCase<| { + case |>FIELD,STATIC:Case1<|; + #[Deprecated] + case |>FIELD,STATIC:DeprecatedCase1<|; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<|; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<|; +} + +enum |>CLASS:DeprecatedBackedEnumCase<|: string { + case |>FIELD,STATIC:Case1<| = "case 1"; + #[Deprecated] + case |>FIELD,STATIC:DeprecatedCase1<| = "deprecated case 1"; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<| = "deprecated case 2"; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<| = "deprecated case 3"; +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespaceWithUse.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespaceWithUse.php new file mode 100644 index 000000000000..24ea76d08f16 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespaceWithUse.php @@ -0,0 +1,42 @@ +CLASS:DeprecatedEnumCase<| { + case |>FIELD,STATIC:Case1<|; + #[Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase1<|; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<|; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<|; +} + +enum |>CLASS:DeprecatedBackedEnumCase<|: string { + case |>FIELD,STATIC:Case1<| = "case 1"; + #[Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase1<| = "deprecated case 1"; + #[\Deprecated(|>CUSTOM2:since: <|"1.2", |>CUSTOM2:message: <|"test")] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase2<| = "deprecated case 2"; + #[Attr, \Deprecated] + case |>DEPRECATED,FIELD,STATIC:DeprecatedCase3<| = "deprecated case 3"; +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInGlobal.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInGlobal.php new file mode 100644 index 000000000000..6ab7dcf1bad9 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInGlobal.php @@ -0,0 +1,89 @@ +DEPRECATED:deprecated01<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +function |>DEPRECATED:deprecated02<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +#[Attr3] +function |>DEPRECATED:deprecated03<|(): void { +} + +#[Attr1, Attr2()] +function deprecated04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam01<|(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam02<|(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace01.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace01.php new file mode 100644 index 000000000000..b97bf38262eb --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace01.php @@ -0,0 +1,94 @@ +DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function deprecatedWithParam01(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function deprecatedWithParam02(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} + +namespace DeprecatedTest2; + +function test(): void {} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace02.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace02.php new file mode 100644 index 000000000000..c05d563c3a1e --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace02.php @@ -0,0 +1,94 @@ +DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function deprecatedWithParam01(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function deprecatedWithParam02(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace03.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace03.php new file mode 100644 index 000000000000..e4191bfb8f74 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace03.php @@ -0,0 +1,178 @@ +DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function deprecatedWithParam01(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function deprecatedWithParam02(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} + +namespace DeprecatedTest2; + +#[Deprecated] +function deprecated(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +function deprecated02(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +#[Attr3] +function deprecated03(): void { +} + +#[Attr1, Attr2()] +function deprecated04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function deprecatedWithParam01(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function deprecatedWithParam02(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse01.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse01.php new file mode 100644 index 000000000000..189def77d3ba --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse01.php @@ -0,0 +1,96 @@ +DEPRECATED:deprecated<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +function |>DEPRECATED:deprecated02<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +#[Attr3] +function |>DEPRECATED:deprecated03<|(): void { +} + +#[Attr1, Attr2()] +function deprecated04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam01<|(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam02<|(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} + +namespace DeprecatedTest2; + +function test(): void {} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse02.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse02.php new file mode 100644 index 000000000000..7923d9af0bb2 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse02.php @@ -0,0 +1,96 @@ +DEPRECATED:deprecated<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +function |>DEPRECATED:deprecated02<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +#[Attr3] +function |>DEPRECATED:deprecated03<|(): void { +} + +#[Attr1, Attr2()] +function deprecated04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam01<|(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam02<|(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse03.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse03.php new file mode 100644 index 000000000000..97a29a5629a6 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse03.php @@ -0,0 +1,167 @@ +DEPRECATED:deprecated<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +function |>DEPRECATED:deprecated02<|(): void { +} + +#[Attr1, Attr2()] +#[Deprecated] +#[Attr3] +function |>DEPRECATED:deprecated03<|(): void { +} + +#[Attr1, Attr2()] +function deprecated04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam01<|(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam02<|(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} + +namespace DeprecatedTest2; + +use Deprecated; + +#[Deprecated] +function |>DEPRECATED:deprecated<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Deprecated] +function |>DEPRECATED:deprecatedWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[Attr] +function |>DEPRECATED:deprecatedWithPhpDoc02<|(): void { +} + +#[Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam01<|(): void { +} + +#[Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedWithParam02<|(): void { +} + +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +function |>DEPRECATED:deprecatedFQN02<|(): void { +} + +#[\Attr1, \Attr2()] +#[\Deprecated] +#[\Attr3] +function |>DEPRECATED:deprecatedFQN03<|(): void { +} + +#[\Attr1, \Attr2()] +function deprecatedFQN04(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Deprecated] +function |>DEPRECATED:deprecatedFQNWithPhpDoc01<|(): void { +} + +/** + * @deprecated since 2.0 + * @return void + */ +#[\Attr] +function |>DEPRECATED:deprecatedFQNWithPhpDoc02<|(): void { +} + +#[\Deprecated("2.0.0", "use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam01<|(): void { +} + +#[\Deprecated(|>CUSTOM2:since: <|"2.0.0", |>CUSTOM2:message: <|"use newFunction() instead")] +function |>DEPRECATED:deprecatedFQNWithParam02<|(): void { +} diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInGlobal.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInGlobal.php new file mode 100644 index 000000000000..a80a4a3c47b4 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInGlobal.php @@ -0,0 +1,177 @@ +CLASS:DeprecatedClassMethod<| { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +} + +interface |>CLASS:DeprecatedInterfaceMethod<| { + public function |>METHOD:publicMethod<|():void; + #[\Attr] + public static function |>METHOD,STATIC:publicStaticMethod<|():void; + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void; + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void; + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void; + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void; +} + +trait |>CLASS:DeprecatedTraitMethod<| { + public function |>METHOD:publicTraitMethod<|():void {} + private function |>METHOD:privateTraitMethod<|():void {} + protected function |>METHOD:protectedTraitMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticTraitMethod<|():void {} + private static function |>METHOD,STATIC:privateStaticTraitMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticTraitMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedTraitMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD:privateDeprecatedTraitMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedTraitMethod<|():void {} + #[Attr1] + #[Attr2, Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC:privateDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticTraitMethod<|():void {} + /** + * @deprecated since 1.0 + * @return void + */ + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD:privateDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + /** + * @return void + */ + protected function |>DEPRECATED,METHOD:protectedDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticTraitMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC:privateDeprecatedStaticTraitMethod02<|():void {} + #[\Attr] + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticTraitMethod02<|():void {} +} + +enum |>CLASS:DeprecatedEnumMethod<| { + public function |>METHOD:publicEnumMethod<|():void {} + private function |>METHOD,UNUSED:privateEnumMethod<|():void {} + protected function |>METHOD:protectedEnumMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticEnumMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticEnumMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticEnumMethod<|():void {} + #[Deprecated, Attr1] + public function |>DEPRECATED,METHOD:publicDeprecatedEnumMethod<|():void {} + #[Deprecated] + #[Attr2] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedEnumMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedEnumMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticEnumMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticEnumMethod02<|():void {} +} + +$anon = new class() { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +}; diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespace.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespace.php new file mode 100644 index 000000000000..781b4410b9b3 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespace.php @@ -0,0 +1,179 @@ +CLASS:DeprecatedClassMethod<| { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +} + +interface |>CLASS:DeprecatedInterfaceMethod<| { + public function |>METHOD:publicMethod<|():void; + #[\Attr] + public static function |>METHOD,STATIC:publicStaticMethod<|():void; + #[Deprecated] + public function |>METHOD:publicDeprecatedMethod<|():void; + #[Deprecated] + public static function |>METHOD,STATIC:publicDeprecatedStaticMethod<|():void; + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void; + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void; +} + +trait |>CLASS:DeprecatedTraitMethod<| { + public function |>METHOD:publicTraitMethod<|():void {} + private function |>METHOD:privateTraitMethod<|():void {} + protected function |>METHOD:protectedTraitMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticTraitMethod<|():void {} + private static function |>METHOD,STATIC:privateStaticTraitMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticTraitMethod<|():void {} + #[Deprecated] + public function |>METHOD:publicDeprecatedTraitMethod<|():void {} + #[Deprecated] + private function |>METHOD:privateDeprecatedTraitMethod<|():void {} + #[Deprecated] + protected function |>METHOD:protectedDeprecatedTraitMethod<|():void {} + #[Attr1] + #[Attr2, Deprecated] + public static function |>METHOD,STATIC:publicDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + private static function |>METHOD,STATIC:privateDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + protected static function |>METHOD,STATIC:protectedDeprecatedStaticTraitMethod<|():void {} + /** + * @deprecated since 1.0 + * @return void + */ + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD:privateDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + /** + * @return void + */ + protected function |>DEPRECATED,METHOD:protectedDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticTraitMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC:privateDeprecatedStaticTraitMethod02<|():void {} + #[\Attr] + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticTraitMethod02<|():void {} +} + +enum |>CLASS:DeprecatedEnumMethod<| { + public function |>METHOD:publicEnumMethod<|():void {} + private function |>METHOD,UNUSED:privateEnumMethod<|():void {} + protected function |>METHOD:protectedEnumMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticEnumMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticEnumMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticEnumMethod<|():void {} + #[Deprecated, Attr1] + public function |>METHOD:publicDeprecatedEnumMethod<|():void {} + #[Deprecated] + #[Attr2] + private function |>METHOD,UNUSED:privateDeprecatedEnumMethod<|():void {} + #[Deprecated] + protected function |>METHOD:protectedDeprecatedEnumMethod<|():void {} + #[Deprecated] + public static function |>METHOD,STATIC:publicDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + private static function |>METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + protected static function |>METHOD,STATIC:protectedDeprecatedStaticEnumMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticEnumMethod02<|():void {} +} + +$anon = new class() { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +}; diff --git a/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespaceWithUse.php b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespaceWithUse.php new file mode 100644 index 000000000000..5383a462068f --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespaceWithUse.php @@ -0,0 +1,181 @@ +CLASS:DeprecatedClassMethod<| { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +} + +interface |>CLASS:DeprecatedInterfaceMethod<| { + public function |>METHOD:publicMethod<|():void; + #[\Attr] + public static function |>METHOD,STATIC:publicStaticMethod<|():void; + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void; + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void; + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void; + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void; +} + +trait |>CLASS:DeprecatedTraitMethod<| { + public function |>METHOD:publicTraitMethod<|():void {} + private function |>METHOD:privateTraitMethod<|():void {} + protected function |>METHOD:protectedTraitMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticTraitMethod<|():void {} + private static function |>METHOD,STATIC:privateStaticTraitMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticTraitMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedTraitMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD:privateDeprecatedTraitMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedTraitMethod<|():void {} + #[Attr1] + #[Attr2, Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC:privateDeprecatedStaticTraitMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticTraitMethod<|():void {} + /** + * @deprecated since 1.0 + * @return void + */ + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD:privateDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + /** + * @return void + */ + protected function |>DEPRECATED,METHOD:protectedDeprecatedTraitMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticTraitMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC:privateDeprecatedStaticTraitMethod02<|():void {} + #[\Attr] + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticTraitMethod02<|():void {} +} + +enum |>CLASS:DeprecatedEnumMethod<| { + public function |>METHOD:publicEnumMethod<|():void {} + private function |>METHOD,UNUSED:privateEnumMethod<|():void {} + protected function |>METHOD:protectedEnumMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticEnumMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticEnumMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticEnumMethod<|():void {} + #[Deprecated, Attr1] + public function |>DEPRECATED,METHOD:publicDeprecatedEnumMethod<|():void {} + #[Deprecated] + #[Attr2] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedEnumMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedEnumMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticEnumMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedEnumMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticEnumMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticEnumMethod02<|():void {} +} + +$anon = new class() { + #[Attr] + public function |>METHOD:publicMethod<|():void {} + private function |>METHOD,UNUSED:privateMethod<|():void {} + protected function |>METHOD:protectedMethod<|():void {} + public static function |>METHOD,STATIC:publicStaticMethod<|():void {} + private static function |>METHOD,STATIC,UNUSED:privateStaticMethod<|():void {} + protected static function |>METHOD,STATIC:protectedStaticMethod<|():void {} + #[Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod<|():void {} + #[Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod<|():void {} + #[Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod<|():void {} + #[Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod<|():void {} + #[Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod<|():void {} + #[Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod<|():void {} + #[\Deprecated] + public function |>DEPRECATED,METHOD:publicDeprecatedMethod02<|():void {} + #[\Deprecated] + private function |>DEPRECATED,METHOD,UNUSED:privateDeprecatedMethod02<|():void {} + #[\Deprecated] + protected function |>DEPRECATED,METHOD:protectedDeprecatedMethod02<|():void {} + #[\Deprecated] + public static function |>DEPRECATED,METHOD,STATIC:publicDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + private static function |>DEPRECATED,METHOD,STATIC,UNUSED:privateDeprecatedStaticMethod02<|():void {} + #[\Deprecated] + protected static function |>DEPRECATED,METHOD,STATIC:protectedDeprecatedStaticMethod02<|():void {} +}; diff --git a/php/php.editor/test/unit/data/testfiles/structure/php84/deprecatedAttributeEnumCaseInGlobal.php b/php/php.editor/test/unit/data/testfiles/structure/php84/deprecatedAttributeEnumCaseInGlobal.php new file mode 100644 index 000000000000..dace9758a185 --- /dev/null +++ b/php/php.editor/test/unit/data/testfiles/structure/php84/deprecatedAttributeEnumCaseInGlobal.php @@ -0,0 +1,39 @@ + createClassPathsForTest() { return Collections.singletonMap( diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedEnumCaseSemanticAnalysisTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedEnumCaseSemanticAnalysisTest.java index 41501c4377ee..a308d98481e2 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedEnumCaseSemanticAnalysisTest.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedEnumCaseSemanticAnalysisTest.java @@ -37,6 +37,18 @@ public void testDeprecatedEnumCasesDeclarations() throws Exception { checkSemantic("testfiles/semantic/deprecatedEnumCase/deprecatedEnumCase.php"); } + public void testDeprecatedAttributeInGlobal() throws Exception { + checkSemantic("testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInGlobal.php"); + } + + public void testDeprecatedAttributeInNamespace() throws Exception { + checkSemantic("testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespace.php"); + } + + public void testDeprecatedAttributeInNamespaceWithUse() throws Exception { + checkSemantic("testfiles/semantic/deprecatedEnumCase/deprecatedAttributeInNamespaceWithUse.php"); + } + @Override protected Map createClassPathsForTest() { return Collections.singletonMap( diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedFunctionsSemanticAnalysisTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedFunctionsSemanticAnalysisTest.java index 47a042c72c72..703f2d85cbd4 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedFunctionsSemanticAnalysisTest.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedFunctionsSemanticAnalysisTest.java @@ -41,6 +41,34 @@ public void testDeprecatedPrivateClassMethod() throws Exception { checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedFunction.php"); } + public void testDeprecatedAttributeInGlobal() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInGlobal.php"); + } + + public void testDeprecatedAttributeInNamespace01() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace01.php"); + } + + public void testDeprecatedAttributeInNamespace02() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace02.php"); + } + + public void testDeprecatedAttributeInNamespace03() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespace03.php"); + } + + public void testDeprecatedAttributeInNamespaceWithUse01() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse01.php"); + } + + public void testDeprecatedAttributeInNamespaceWithUse02() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse02.php"); + } + + public void testDeprecatedAttributeInNamespaceWithUse03() throws Exception { + checkSemantic("testfiles/semantic/deprecatedFunctions/deprecatedAttributeInNamespaceWithUse03.php"); + } + @Override protected Map createClassPathsForTest() { return Collections.singletonMap( diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedMethodsSemanticAnalysisTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedMethodsSemanticAnalysisTest.java index 5987bfd4f561..741f90c2cb24 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedMethodsSemanticAnalysisTest.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/DeprecatedMethodsSemanticAnalysisTest.java @@ -49,6 +49,18 @@ public void testDeprecatedPrivateClassMethod() throws Exception { checkSemantic("testfiles/semantic/deprecatedMethods/deprecatedPrivateClassMethod.php"); } + public void testDeprecatedAttributeInGlobal() throws Exception { + checkSemantic("testfiles/semantic/deprecatedMethods/deprecatedAttributeInGlobal.php"); + } + + public void testDeprecatedAttributeInNamespace() throws Exception { + checkSemantic("testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespace.php"); + } + + public void testDeprecatedAttributeInNamespaceWithUse() throws Exception { + checkSemantic("testfiles/semantic/deprecatedMethods/deprecatedAttributeInNamespaceWithUse.php"); + } + @Override protected Map createClassPathsForTest() { return Collections.singletonMap( diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/NavigatorTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/NavigatorTest.java index e92c6cfaa184..d23711fd4b02 100644 --- a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/NavigatorTest.java +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/csl/NavigatorTest.java @@ -164,4 +164,68 @@ public void testTypedClassConstants() throws Exception { public void testNewWithoutParentheses() throws Exception { performTest("structure/php84/newWithoutParentheses"); } + + public void testDeprecatedAttributeFunctionsInGlobal() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInGlobal"); + } + + public void testDeprecatedAttributeFunctionsInNamespace01() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespace01"); + } + + public void testDeprecatedAttributeFunctionsInNamespace02() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespace02"); + } + + public void testDeprecatedAttributeFunctionsInNamespace03() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespace03"); + } + + public void testDeprecatedAttributeFunctionsInNamespaceWithUse01() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse01"); + } + + public void testDeprecatedAttributeFunctionsInNamespaceWithUse02() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse02"); + } + + public void testDeprecatedAttributeFunctionsInNamespaceWithUse03() throws Exception { + performTest("structure/php84/deprecatedAttributeFunctionsInNamespaceWithUse03"); + } + + public void testDeprecatedAttributeMethodsInGlobal() throws Exception { + performTest("structure/php84/deprecatedAttributeMethodsInGlobal"); + } + + public void testDeprecatedAttributeMethodsInNamespace() throws Exception { + performTest("structure/php84/deprecatedAttributeMethodsInNamespace"); + } + + public void testDeprecatedAttributeMethodsInNamespaceWithUse() throws Exception { + performTest("structure/php84/deprecatedAttributeMethodsInNamespaceWithUse"); + } + + public void testDeprecatedAttributeEnumCaseInGlobal() throws Exception { + performTest("structure/php84/deprecatedAttributeEnumCaseInGlobal"); + } + + public void testDeprecatedAttributeEnumCaseInNamespace() throws Exception { + performTest("structure/php84/deprecatedAttributeEnumCaseInNamespace"); + } + + public void testDeprecatedAttributeEnumCaseInNamespaceWithUse() throws Exception { + performTest("structure/php84/deprecatedAttributeEnumCaseInNamespaceWithUse"); + } + + public void testDeprecatedAttributeTypeConstantInGlobal() throws Exception { + performTest("structure/php84/deprecatedAttributeTypeConstantInGlobal"); + } + + public void testDeprecatedAttributeTypeConstantInNamespace() throws Exception { + performTest("structure/php84/deprecatedAttributeTypeConstantInNamespace"); + } + + public void testDeprecatedAttributeTypeConstantInNamespaceWithUse() throws Exception { + performTest("structure/php84/deprecatedAttributeTypeConstantInNamespaceWithUse"); + } } diff --git a/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintErrorTest.java b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintErrorTest.java new file mode 100644 index 000000000000..d4d20697176b --- /dev/null +++ b/php/php.editor/test/unit/src/org/netbeans/modules/php/editor/verification/IncorrectDeprecatedAttributeHintErrorTest.java @@ -0,0 +1,101 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.netbeans.modules.php.editor.verification; + +import org.netbeans.modules.php.api.PhpVersion; + +public class IncorrectDeprecatedAttributeHintErrorTest extends PHPHintsTestBase { + + public IncorrectDeprecatedAttributeHintErrorTest(String testName) { + super(testName); + } + + private void checkHints(String fileName, PhpVersion phpVersion) throws Exception { + checkHints(new IncorrectDeprecatedAttributeHintErrorStub(phpVersion), fileName); + } + + @Override + protected String getTestDirectory() { + return TEST_DIRECTORY + "IncorrectDeprecatedAttributeHintError/"; + } + + public void testFieldsInGlobal_PHP83() throws Exception { + checkHints("testFieldsInGlobal.php", PhpVersion.PHP_83); + } + + public void testFieldsInGlobal_PHP84() throws Exception { + checkHints("testFieldsInGlobal.php", PhpVersion.PHP_84); + } + + public void testFieldsInNamespace_PHP83() throws Exception { + checkHints("testFieldsInNamespace.php", PhpVersion.PHP_83); + } + + public void testFieldsInNamespace_PHP84() throws Exception { + checkHints("testFieldsInNamespace.php", PhpVersion.PHP_84); + } + + public void testFieldsInNamespaceWithUse_PHP83() throws Exception { + checkHints("testFieldsInNamespaceWithUse.php", PhpVersion.PHP_83); + } + + public void testFieldsInNamespaceWithUse_PHP84() throws Exception { + checkHints("testFieldsInNamespaceWithUse.php", PhpVersion.PHP_84); + } + + public void testTypesInGlobal_PHP83() throws Exception { + checkHints("testTypesInGlobal.php", PhpVersion.PHP_83); + } + + public void testTypesInGlobal_PHP84() throws Exception { + checkHints("testTypesInGlobal.php", PhpVersion.PHP_84); + } + + public void testTypesInNamespace_PHP83() throws Exception { + checkHints("testTypesInNamespace.php", PhpVersion.PHP_83); + } + + public void testTypesInNamespace_PHP84() throws Exception { + checkHints("testTypesInNamespace.php", PhpVersion.PHP_84); + } + + public void testTypesInNamespaceWithUse_PHP83() throws Exception { + checkHints("testTypesInNamespaceWithUse.php", PhpVersion.PHP_83); + } + + public void testTypesInNamespaceWithUse_PHP84() throws Exception { + checkHints("testTypesInNamespaceWithUse.php", PhpVersion.PHP_84); + } + + private static class IncorrectDeprecatedAttributeHintErrorStub extends IncorrectDeprecatedAttributeHintError { + + private final PhpVersion PhpVersion; + + public IncorrectDeprecatedAttributeHintErrorStub(PhpVersion PhpVersion) { + this.PhpVersion = PhpVersion; + } + + @Override + protected PhpVersion getPhpVersion() { + return PhpVersion; + } + + } + +}