summaryrefslogtreecommitdiff
path: root/php
diff options
context:
space:
mode:
authorAustin Henriksen <austin@zeroc.com>2019-10-30 05:14:29 -0400
committerJoe George <joe@zeroc.com>2021-02-01 16:46:35 -0500
commit452f57976a135c8b72fc8d8f580d5d50618c0cae (patch)
tree0233eedd3cdc380126fd613b04b8b468beb289c0 /php
parentRemove IcePatch2 (#602) (diff)
downloadice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.bz2
ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.tar.xz
ice-452f57976a135c8b72fc8d8f580d5d50618c0cae.zip
Remove checksum support (#607)
* Removed checksum sources from swift mapping project file. * Removed checksum tests from Python. * Removed checksum from Python mapping. * Removed checksum tests from PHP mapping. * Removed checksum support from PHP mapping. * Removed checksum sources from MATLAB project file. * Removed checksum option from slice2x manpages. * Removed checksum sources from JavaScript mapping. * Removed checksum tests from Java mapping. * Removed outdated checksum metadata from Java mapping. * Removed checksum support from Java mapping. * Removed checksum tests from csharp. * Removed checksum support from csharp mapping. * Removed checksum tests from cpp * Removed checksum support from IceBox. * Removed checksum support from IceStorm. * Removed Slice checksum support from IceGrid. * Fixed broken filters file for Slice VS project. * Removed checksum support from cpp mapping. * Removed checksum support from Slice definitions. * Removed checksum support from cpp98 mapping.
Diffstat (limited to 'php')
-rw-r--r--php/lib/Ice_no_ns.php3
-rw-r--r--php/lib/Ice_ns.php20
-rw-r--r--php/msbuild/ice.php.proj2
-rw-r--r--php/msbuild/ice.php.test.proj8
-rw-r--r--php/test/Ice/checksum/.gitignore2
-rw-r--r--php/test/Ice/checksum/CTypes.ice627
-rw-r--r--php/test/Ice/checksum/Checksums_no_ns.php64
-rw-r--r--php/test/Ice/checksum/Checksums_ns.php64
-rw-r--r--php/test/Ice/checksum/Client.php29
-rw-r--r--php/test/Ice/checksum/Makefile.mk7
-rw-r--r--php/test/Ice/checksum/Test.ice19
11 files changed, 2 insertions, 843 deletions
diff --git a/php/lib/Ice_no_ns.php b/php/lib/Ice_no_ns.php
index 385d560aeb6..0cff88c4ab9 100644
--- a/php/lib/Ice_no_ns.php
+++ b/php/lib/Ice_no_ns.php
@@ -183,9 +183,6 @@ class Ice_FormatType
const SlicedFormat = 2;
}
-global $Ice_sliceChecksums;
-$Ice_sliceChecksums = array();
-
//
// Include certain generated files.
//
diff --git a/php/lib/Ice_ns.php b/php/lib/Ice_ns.php
index ffe5c521135..da443206c1d 100644
--- a/php/lib/Ice_ns.php
+++ b/php/lib/Ice_ns.php
@@ -187,26 +187,6 @@ namespace Ice
const CompactFormat = 1;
const SlicedFormat = 2;
}
-
- class SliceChecksumInit
- {
- public function __construct($checksums)
- {
- SliceChecksumInit::$_checksums = array_merge(SliceChecksumInit::$_checksums, $checksums);
- }
-
- public static function checksums()
- {
- return SliceChecksumInit::$_checksums;;
- }
-
- private static $_checksums = array();
- };
-
- function sliceChecksums()
- {
- return SliceChecksumInit::checksums();
- }
}
namespace
diff --git a/php/msbuild/ice.php.proj b/php/msbuild/ice.php.proj
index b70a7cdbea0..d9fa4b88195 100644
--- a/php/msbuild/ice.php.proj
+++ b/php/msbuild/ice.php.proj
@@ -2,7 +2,7 @@
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<SliceCompile>
- <AdditionalOptions>--ice --checksum</AdditionalOptions>
+ <AdditionalOptions>--ice</AdditionalOptions>
</SliceCompile>
</ItemDefinitionGroup>
diff --git a/php/msbuild/ice.php.test.proj b/php/msbuild/ice.php.test.proj
index 14c93ec7816..8e5396778fc 100644
--- a/php/msbuild/ice.php.test.proj
+++ b/php/msbuild/ice.php.test.proj
@@ -2,17 +2,11 @@
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<SliceCompile Include="..\test\**\*.ice"
- Exclude="..\test\Ice\checksum\*.ice;
- ..\test\Ice\optional\*.ice;
+ Exclude="..\test\Ice\optional\*.ice;
..\test\Ice\slicing\objects\*.ice">
<OutputDir>$(MSBuildThisFileDirectory)..\test\%(RecursiveDir)</OutputDir>
</SliceCompile>
- <SliceCompile Include="..\test\Ice\checksum\*.ice">
- <OutputDir>$(MSBuildThisFileDirectory)..\test\Ice\checksum</OutputDir>
- <AdditionalOptions>--checksum</AdditionalOptions>
- </SliceCompile>
-
<SliceCompile Include="..\test\Ice\optional\*.ice">
<OutputDir>$(MSBuildThisFileDirectory)..\test\Ice\optional</OutputDir>
<AdditionalOptions>-I$(MSBuildThisFileDirectory)..\test\Ice\optional</AdditionalOptions>
diff --git a/php/test/Ice/checksum/.gitignore b/php/test/Ice/checksum/.gitignore
deleted file mode 100644
index 66cc0dff1cf..00000000000
--- a/php/test/Ice/checksum/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-CTypes.php
-Test.php
diff --git a/php/test/Ice/checksum/CTypes.ice b/php/test/Ice/checksum/CTypes.ice
deleted file mode 100644
index 2de632ba2af..00000000000
--- a/php/test/Ice/checksum/CTypes.ice
+++ /dev/null
@@ -1,627 +0,0 @@
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-
-#pragma once
-
-module Test
-{
-
-//
-// TEST: Same
-//
-const int IntConst1 = 100;
-
-//
-// TEST: Value changed
-//
-const int IntConst2 = 100;
-
-//
-// TEST: Type changed
-//
-const int IntConst3 = 100;
-
-//
-// TEST: Same
-//
-enum Enum1 { Enum11, Enum12, Enum13 }
-
-//
-// TEST: Add enumerator
-//
-enum Enum2 { Enum21, Enum22, Enum23 }
-
-//
-// TEST: Remove enumerator
-//
-enum Enum3 { Enum31, Enum32, Enum33 }
-
-//
-// TEST: Change to a different type
-//
-enum Enum4 { Enum41, Enum42, Enum43 }
-
-//
-// TEST: Enum with explicit values.
-//
-enum EnumExplicit0 { EnumExplicit01 = 1, EnumExplicit02 = 2, EnumExplicit03 = 3 }
-
-//
-// TEST: Enum with same explicit values, different order.
-//
-enum EnumExplicit1 { EnumExplicit11 = 1, EnumExplicit12 = 2, EnumExplicit13 = 3 }
-
-//
-// TEST: Enum with different explicit values.
-//
-enum EnumExplicit2 { EnumExplicit21 = 1, EnumExplicit22 = 2, EnumExplicit23 = 3}
-
-//
-// TEST: Enum with explicit values, removed enumerator.
-//
-enum EnumExplicit3 { EnumExplicit31 = 1, EnumExplicit32 = 2, EnumExplicit33 = 3}
-
-//
-// TEST: Same
-//
-sequence<int> Sequence1;
-
-//
-// TEST: Change sequence type
-//
-sequence<int> Sequence2;
-
-//
-// TEST: Change to a different type
-//
-sequence<int> Sequence3;
-
-//
-// TEST: Same
-//
-dictionary<string, int> Dictionary1;
-
-//
-// TEST: Change key type
-//
-dictionary<string, int> Dictionary2;
-
-//
-// TEST: Change value type
-//
-dictionary<string, int> Dictionary3;
-
-//
-// TEST: Change to a different type
-//
-dictionary<string, int> Dictionary4;
-
-//
-// TEST: Same
-//
-struct Struct1
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Add member
-//
-struct Struct2
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Change member type
-//
-struct Struct3
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Remove member
-//
-struct Struct4
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Change to a different type
-//
-struct Struct5
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Same
-//
-interface Interface1
-{
-}
-
-//
-// TEST: Change interface to class
-//
-interface Interface2
-{
-}
-
-//
-// TEST: Add base interface
-//
-interface Interface3
-{
-}
-
-//
-// TEST: Add operation
-//
-interface Interface4
-{
-}
-
-//
-// TEST: Same
-//
-class EmptyClass1
-{
-}
-
-//
-// TEST: Add data member
-//
-class EmptyClass2
-{
-}
-
-//
-// TEST: Add operation
-//
-class EmptyClass3
-{
-}
-
-//
-// TEST: Add base class
-//
-class EmptyClass4
-{
-}
-
-//
-// TEST: Add interface
-//
-class EmptyClass5
-{
-}
-
-//
-// TEST: Same
-//
-class SimpleClass1
-{
- string str;
- float f;
-}
-
-//
-// TEST: Add operation
-//
-class SimpleClass2
-{
- string str;
- float f;
-}
-
-//
-// TEST: Rename member
-//
-class SimpleClass3
-{
- string str;
- float f;
-}
-
-//
-// TEST: Add member
-//
-class SimpleClass4
-{
- string str;
- float f;
-}
-
-//
-// TEST: Remove member
-//
-class SimpleClass5
-{
- string str;
- float f;
-}
-
-//
-// TEST: Reorder members
-//
-class SimpleClass6
-{
- string str;
- float f;
-}
-
-//
-// TEST: Change member type
-//
-class SimpleClass7
-{
- string str;
- float f;
-}
-
-//
-// TEST: Same
-//
-exception Exception1
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Add member
-//
-exception Exception2
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Change member type
-//
-exception Exception3
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Remove member
-//
-exception Exception4
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Add base exception
-//
-exception Exception5
-{
-}
-
-//
-// TEST: Change to a different type
-//
-exception Exception6
-{
- string str;
- bool b;
-}
-
-//
-// TEST: Exception with optional members.
-//
-exception OptionalEx0
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Exception with optional members, different order, same tags.
-//
-exception OptionalEx1
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Exception with different optional members.
-//
-exception OptionalEx2
-{
- string firstName;
- string secondName;
- optional(1) string emailAddress;
-}
-
-//
-// TEST: Exception with different optional members.
-//
-exception OptionalEx3
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Exception with optional members using different tags.
-//
-exception OptionalEx4
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Same
-//
-interface BaseInterface1
-{
- void baseOp1();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Change return type
-//
-interface BaseInterface2
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Add parameter
-//
-interface BaseInterface3
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Add exception
-//
-interface BaseInterface4
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Change out parameter to in parameter
-//
-interface BaseInterface5
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Remove parameter
-//
-interface BaseInterface6
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Remove exception
-//
-interface BaseInterface7
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Remove operation
-//
-interface BaseInterface8
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Add base class
-//
-interface BaseInterface9
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Add interface
-//
-interface BaseInterface10
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Add base class and interface
-//
-interface BaseInterface11
-{
- void baseOp();
- void baseOp2(int i, out string s) throws Exception1;
-}
-
-//
-// TEST: Class with compact id
-//
-class Compact1(1)
-{
- int id;
-}
-
-//
-// TEST: Derived from class with compact id
-//
-class Derived1 extends Compact1
-{
-}
-
-//
-// TEST: Same class names but different compact id
-//
-class Compact2(2)
-{
- int id;
-}
-
-//
-// TEST: Class with optional members.
-//
-class Optional0
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Class with optional members, different order, same tags.
-//
-class Optional1
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Class with different optional members.
-//
-class Optional2
-{
- string firstName;
- string secondName;
- optional(1) string emailAddress;
-}
-
-//
-// TEST: Class with different optional members.
-//
-class Optional3
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Class with optional members using different tags.
-//
-class Optional4
-{
- string firstName;
- optional(1) string secondName;
- optional(2) string emailAddress;
-}
-
-//
-// TEST: Interface with optional parameters.
-//
-interface OptionalParameters0
-{
- void op1(string firstName, optional(1) string secondName,
- optional(2) string emailAddress);
-}
-
-//
-// TEST: Interface with optional parameters, different order.
-//
-interface OptionalParameters1
-{
- void op1(string firstName, optional(1) string secondName,
- optional(2) string emailAddress);
-}
-
-//
-// TEST: Interface with optional parameters, different tags.
-//
-interface OptionalParameters2
-{
- void op1(string firstName, optional(1) string emailAddress,
- optional(2) string secondName);
-}
-
-//
-// TEST: Interface with different optional parameters.
-//
-interface OptionalParameters3
-{
- void op1(string firstName, optional(1) string emailAddress,
- string secondName);
-}
-
-//
-// TEST: Interface with optional return type.
-//
-interface OptionalReturn0
-{
- optional(1) int op();
-}
-
-//
-// TEST: Interface that changes optional return type.
-//
-interface OptionalReturn2
-{
- optional(1) int op();
-}
-
-//
-// TEST: Local
-//
-local enum LocalEnum { LocalEnum1, LocalEnum2, LocalEnum3 }
-
-//
-// TEST: Local
-//
-local sequence<string> LocalSequence;
-
-//
-// TEST: Local
-//
-local dictionary<string, string> LocalDictionary;
-
-//
-// TEST: Local
-//
-local struct LocalStruct
-{
- string str;
-}
-
-//
-// TEST: Local
-//
-local class LocalClass
-{
-}
-
-}
diff --git a/php/test/Ice/checksum/Checksums_no_ns.php b/php/test/Ice/checksum/Checksums_no_ns.php
deleted file mode 100644
index 4dec22e4a19..00000000000
--- a/php/test/Ice/checksum/Checksums_no_ns.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-
-function allTests($helper)
-{
- global $Ice_sliceChecksums;
- $communicator = $helper->communicator();
- $ref = sprintf("test:%s", $helper->getTestEndpoint());
- $base = $communicator->stringToProxy($ref);
- test($base);
-
- $checksum = $base->ice_checkedCast("::Test::Checksum");
- test($checksum);
-
- //
- // Verify that no checksums are present for local types.
- //
- echo "testing checksums... ";
- flush();
- test(count($Ice_sliceChecksums) > 0);
- foreach($Ice_sliceChecksums as $i => $value)
- {
- test(!strpos($i, "Local"));
- }
-
- //
- // Get server's Slice checksums.
- //
- $d = $checksum->getSliceChecksums();
-
- //
- // Compare the checksums. For a type FooN whose name ends in an integer N,
- // we assume that the server's type does not change for N = 1, and does
- // change for N > 1.
- //
- foreach($d as $i => $value)
- {
- $n = 0;
- preg_match("/\\d+/", $i, $matches);
- if($matches)
- {
- $n = (int)$matches[0];
- }
-
- test(isset($Ice_sliceChecksums[$i]));
-
- if($n <= 1)
- {
- test($Ice_sliceChecksums[$i] == $d[$i]);
- }
- else
- {
- test($Ice_sliceChecksums[$i] != $d[$i]);
- }
- }
-
- echo "ok\n";
-
- return $checksum;
-}
-
-?>
diff --git a/php/test/Ice/checksum/Checksums_ns.php b/php/test/Ice/checksum/Checksums_ns.php
deleted file mode 100644
index 462f7da27bd..00000000000
--- a/php/test/Ice/checksum/Checksums_ns.php
+++ /dev/null
@@ -1,64 +0,0 @@
-<?php
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-
-function allTests($helper)
-{
- $communicator = $helper->communicator();
- $ref = sprintf("test:%s", $helper->getTestEndpoint());
- $base = $communicator->stringToProxy($ref);
- test($base);
-
- $checksum = $base->ice_checkedCast("::Test::Checksum");
- test($checksum);
-
- //
- // Verify that no checksums are present for local types.
- //
- echo "testing checksums... ";
- flush();
- $localChecksums = Ice\sliceChecksums();
- test(count($localChecksums) > 0);
- foreach($localChecksums as $i => $value)
- {
- test(!strpos($i, "Local"));
- }
-
- //
- // Get server's Slice checksums.
- //
- $d = $checksum->getSliceChecksums();
-
- //
- // Compare the checksums. For a type FooN whose name ends in an integer N,
- // we assume that the server's type does not change for N = 1, and does
- // change for N > 1.
- //
- foreach($d as $i => $value)
- {
- $n = 0;
- preg_match("/\\d+/", $i, $matches);
- if($matches)
- {
- $n = (int)$matches[0];
- }
-
- test(isset($localChecksums[$i]));
-
- if($n <= 1)
- {
- test($localChecksums[$i] == $d[$i]);
- }
- else
- {
- test($localChecksums[$i] != $d[$i]);
- }
- }
-
- echo "ok\n";
-
- return $checksum;
-}
-
-?>
diff --git a/php/test/Ice/checksum/Client.php b/php/test/Ice/checksum/Client.php
deleted file mode 100644
index 76199dcef49..00000000000
--- a/php/test/Ice/checksum/Client.php
+++ /dev/null
@@ -1,29 +0,0 @@
-<?php
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-
-require_once('Test.php');
-require_once('CTypes.php');
-global $NS;
-require_once($NS ? "Checksums_ns.php" : "Checksums_no_ns.php");
-
-class Client extends TestHelper
-{
- function run($args)
- {
- try
- {
- $communicator = $this->initialize($args);
- $checksum = allTests($this);
- $checksum->shutdown();
- $communicator->destroy();
- }
- catch(Exception $ex)
- {
- $communicator->destroy();
- throw $ex;
- }
- }
-}
-?>
diff --git a/php/test/Ice/checksum/Makefile.mk b/php/test/Ice/checksum/Makefile.mk
deleted file mode 100644
index d149f956cd6..00000000000
--- a/php/test/Ice/checksum/Makefile.mk
+++ /dev/null
@@ -1,7 +0,0 @@
-#
-# Copyright (c) ZeroC, Inc. All rights reserved.
-#
-
-$(test)_sliceflags = --checksum
-
-tests += $(test)
diff --git a/php/test/Ice/checksum/Test.ice b/php/test/Ice/checksum/Test.ice
deleted file mode 100644
index e487fe94669..00000000000
--- a/php/test/Ice/checksum/Test.ice
+++ /dev/null
@@ -1,19 +0,0 @@
-//
-// Copyright (c) ZeroC, Inc. All rights reserved.
-//
-
-#pragma once
-
-#include <Ice/SliceChecksumDict.ice>
-
-module Test
-{
-
-interface Checksum
-{
- idempotent Ice::SliceChecksumDict getSliceChecksums();
-
- void shutdown();
-}
-
-}